package c.i.a.f.e.h.j; import android.app.Activity; import c.i.a.f.e.c; import com.airbnb.lottie.parser.AnimatableValueParser; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.Status; import com.google.android.gms.tasks.TaskCompletionSource; import java.util.concurrent.CancellationException; /* compiled from: com.google.android.gms:play-services-base@@17.3.0 */ public class b0 extends r0 { public TaskCompletionSource n = new TaskCompletionSource<>(); /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public b0(j jVar) { super(jVar, GoogleApiAvailability.d); Object obj = GoogleApiAvailability.f2285c; jVar.a("GmsAvailabilityHelper", this); } @Override // com.google.android.gms.common.api.internal.LifecycleCallback public void f() { this.n.a(new CancellationException("Host activity was destroyed before Google Play services could be made available.")); } @Override // c.i.a.f.e.h.j.r0 public final void k() { Activity e = this.i.e(); if (e == null) { this.n.a(new ApiException(new Status(8, null))); return; } int b = this.m.b(e, c.a); if (b == 0) { this.n.b(null); } else if (!this.n.a.o()) { n(new ConnectionResult(b, null), 0); } } @Override // c.i.a.f.e.h.j.r0 public final void l(ConnectionResult connectionResult, int i) { TaskCompletionSource taskCompletionSource = this.n; taskCompletionSource.a.s(AnimatableValueParser.n0(new Status(connectionResult.k, connectionResult.m, connectionResult.l))); } }