package com.google.android.gms.common.internal; import android.os.Bundle; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import android.util.Log; import com.google.android.gms.common.ConnectionResult; /* loaded from: classes.dex */ public final class zzf extends zza { public final IBinder zze; final BaseGmsClient zzf; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public zzf(BaseGmsClient baseGmsClient, int i, IBinder iBinder, Bundle bundle) { super(baseGmsClient, i, bundle); this.zzf = baseGmsClient; this.zze = iBinder; } @Override // com.google.android.gms.common.internal.zza protected final void zzb(ConnectionResult connectionResult) { if (BaseGmsClient.zzc(this.zzf) != null) { BaseGmsClient.zzc(this.zzf).onConnectionFailed(connectionResult); } this.zzf.onConnectionFailed(connectionResult); } @Override // com.google.android.gms.common.internal.zza protected final boolean zzd() { try { IBinder iBinder = this.zze; Preconditions.checkNotNull(iBinder); String interfaceDescriptor = iBinder.getInterfaceDescriptor(); if (!this.zzf.getServiceDescriptor().equals(interfaceDescriptor)) { Log.w("GmsClient", "service descriptor mismatch: " + this.zzf.getServiceDescriptor() + " vs. " + interfaceDescriptor); return false; } IInterface createServiceInterface = this.zzf.createServiceInterface(this.zze); if (createServiceInterface == null || !(BaseGmsClient.zzn(this.zzf, 2, 4, createServiceInterface) || BaseGmsClient.zzn(this.zzf, 3, 4, createServiceInterface))) { return false; } BaseGmsClient.zzg(this.zzf, null); Bundle connectionHint = this.zzf.getConnectionHint(); BaseGmsClient baseGmsClient = this.zzf; if (BaseGmsClient.zzb(baseGmsClient) == null) { return true; } BaseGmsClient.zzb(baseGmsClient).onConnected(connectionHint); return true; } catch (RemoteException unused) { Log.w("GmsClient", "service probably died"); return false; } } }