78 lines
2.4 KiB
Java
78 lines
2.4 KiB
Java
package c.i.a.f.e.h.j;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Handler;
|
|
import androidx.collection.ArraySet;
|
|
import c.c.a.a0.d;
|
|
import com.google.android.gms.common.ConnectionResult;
|
|
import com.google.android.gms.common.GoogleApiAvailability;
|
|
import com.google.android.gms.common.api.internal.LifecycleCallback;
|
|
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);
|
|
Object obj = GoogleApiAvailability.f2384c;
|
|
this.o = gVar;
|
|
jVar.a("ConnectionlessLifecycleHelper", this);
|
|
}
|
|
|
|
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);
|
|
}
|
|
d.z(bVar, "ApiKey cannot be null");
|
|
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);
|
|
}
|
|
}
|
|
|
|
@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);
|
|
}
|
|
}
|
|
|
|
@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();
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // c.i.a.f.e.h.j.t0
|
|
public final void k() {
|
|
Handler handler = this.o.w;
|
|
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)) {
|
|
Handler handler = gVar.w;
|
|
handler.sendMessage(handler.obtainMessage(5, i, 0, connectionResult));
|
|
}
|
|
}
|
|
}
|