package com.google.android.gms.common.api.internal; import android.app.Activity; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.internal.Preconditions; import o.wnv; /* loaded from: classes.dex */ public final class zaae extends zap { private final wnv> zad; private final GoogleApiManager zae; zaae(LifecycleFragment lifecycleFragment, GoogleApiManager googleApiManager, GoogleApiAvailability googleApiAvailability) { super(lifecycleFragment, googleApiAvailability); this.zad = new wnv<>(); this.zae = googleApiManager; this.mLifecycleFragment.addCallback("ConnectionlessLifecycleHelper", this); } public static void zad(Activity activity, GoogleApiManager googleApiManager, ApiKey apiKey) { LifecycleFragment fragment = getFragment(activity); zaae zaaeVar = (zaae) fragment.getCallbackOrNull("ConnectionlessLifecycleHelper", zaae.class); if (zaaeVar == null) { zaaeVar = new zaae(fragment, googleApiManager, GoogleApiAvailability.getInstance()); } Preconditions.checkNotNull(apiKey, "ApiKey cannot be null"); zaaeVar.zad.add(apiKey); googleApiManager.zaC(zaaeVar); } private final void zae() { if (this.zad.isEmpty()) { return; } this.zae.zaC(this); } @Override // com.google.android.gms.common.api.internal.LifecycleCallback public final void onResume() { super.onResume(); zae(); } @Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback public final void onStart() { super.onStart(); zae(); } @Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback public final void onStop() { super.onStop(); this.zae.zaD(this); } @Override // com.google.android.gms.common.api.internal.zap protected final void zab(ConnectionResult connectionResult, int i) { this.zae.zaz(connectionResult, i); } @Override // com.google.android.gms.common.api.internal.zap protected final void zac() { this.zae.zaA(); } /* JADX INFO: Access modifiers changed from: package-private */ public final wnv> zaa() { return this.zad; } }