discord-jadx/app/src/main/java/c/i/a/f/e/h/j/a1.java

78 lines
2.4 KiB
Java
Raw Normal View History

package c.i.a.f.e.h.j;
2021-09-07 07:54:21 +00:00
import android.app.Activity;
import android.os.Handler;
import androidx.collection.ArraySet;
2021-10-11 07:48:45 +00:00
import c.c.a.a0.d;
2021-09-07 07:54:21 +00:00
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.api.internal.LifecycleCallback;
2021-09-07 07:54:21 +00:00
import java.util.Objects;
/* compiled from: com.google.android.gms:play-services-base@@17.3.0 */
public class a1 extends t0 {
public final ArraySet<b<?>> n = new ArraySet<>();
public final g o;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public a1(j jVar, g gVar) {
super(jVar, GoogleApiAvailability.d);
2021-11-25 09:11:30 +00:00
Object obj = GoogleApiAvailability.f2386c;
2021-09-07 07:54:21 +00:00
this.o = gVar;
jVar.a("ConnectionlessLifecycleHelper", this);
}
2021-09-07 07:54:21 +00:00
public static void o(Activity activity, g gVar, b<?> bVar) {
j c2 = LifecycleCallback.c(activity);
a1 a1Var = (a1) c2.d("ConnectionlessLifecycleHelper", a1.class);
if (a1Var == null) {
a1Var = new a1(c2, gVar);
}
2021-10-11 07:48:45 +00:00
d.z(bVar, "ApiKey cannot be null");
2021-09-07 07:54:21 +00:00
a1Var.n.add(bVar);
gVar.b(a1Var);
}
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
public void g() {
if (!this.n.isEmpty()) {
this.o.b(this);
}
2021-09-07 07:54:21 +00:00
}
@Override // c.i.a.f.e.h.j.t0, com.google.android.gms.common.api.internal.LifecycleCallback
public void i() {
this.j = true;
if (!this.n.isEmpty()) {
this.o.b(this);
}
2021-09-07 07:54:21 +00:00
}
@Override // c.i.a.f.e.h.j.t0, com.google.android.gms.common.api.internal.LifecycleCallback
public void j() {
this.j = false;
g gVar = this.o;
Objects.requireNonNull(gVar);
synchronized (g.k) {
if (gVar.t == this) {
gVar.t = null;
gVar.u.clear();
}
}
2021-09-07 07:54:21 +00:00
}
@Override // c.i.a.f.e.h.j.t0
public final void k() {
2021-11-01 07:19:03 +00:00
Handler handler = this.o.w;
2021-09-07 07:54:21 +00:00
handler.sendMessage(handler.obtainMessage(3));
}
@Override // c.i.a.f.e.h.j.t0
public final void l(ConnectionResult connectionResult, int i) {
g gVar = this.o;
if (!gVar.c(connectionResult, i)) {
2021-11-01 07:19:03 +00:00
Handler handler = gVar.w;
2021-09-07 07:54:21 +00:00
handler.sendMessage(handler.obtainMessage(5, i, 0, connectionResult));
}
}
}