package com.google.android.gms.common.api.internal; import android.os.RemoteException; import com.google.android.gms.common.Feature; import com.google.android.gms.common.api.internal.ListenerHolder; import com.google.android.gms.tasks.TaskCompletionSource; /* loaded from: classes.dex */ public final class zah extends zad { public final ListenerHolder.ListenerKey zab; public zah(ListenerHolder.ListenerKey listenerKey, TaskCompletionSource taskCompletionSource) { super(4, taskCompletionSource); this.zab = listenerKey; } @Override // com.google.android.gms.common.api.internal.zac public final boolean zaa(zabq zabqVar) { zaci zaciVar = zabqVar.zah().get(this.zab); return zaciVar != null && zaciVar.zaa.zab(); } @Override // com.google.android.gms.common.api.internal.zac public final Feature[] zab(zabq zabqVar) { zaci zaciVar = zabqVar.zah().get(this.zab); if (zaciVar == null) { return null; } return zaciVar.zaa.getRequiredFeatures(); } @Override // com.google.android.gms.common.api.internal.zad public final void zac(zabq zabqVar) throws RemoteException { zaci remove = zabqVar.zah().remove(this.zab); if (remove != null) { remove.zab.unregisterListener(zabqVar.zaf(), this.zaa); remove.zaa.clearListener(); } else { this.zaa.trySetResult(false); } } @Override // com.google.android.gms.common.api.internal.zad, com.google.android.gms.common.api.internal.zai public final /* bridge */ /* synthetic */ void zag(zaad zaadVar, boolean z) { } }