package com.google.android.gms.internal.ads; import android.app.Activity; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import androidx.annotation.Nullable; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.dynamic.RemoteCreator; /* loaded from: classes3.dex */ public final class zzbtb extends RemoteCreator { public zzbtb() { super("com.google.android.gms.ads.AdOverlayCreatorImpl"); } @Override // com.google.android.gms.dynamic.RemoteCreator public final /* synthetic */ Object getRemoteCreator(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.ads.internal.overlay.client.IAdOverlayCreator"); return queryLocalInterface instanceof zzbth ? (zzbth) queryLocalInterface : new zzbtf(iBinder); } @Nullable public final zzbte zza(Activity activity) { try { IBinder zze = ((zzbth) getRemoteCreatorInstance(activity)).zze(ObjectWrapper.wrap(activity)); if (zze == null) { return null; } IInterface queryLocalInterface = zze.queryLocalInterface("com.google.android.gms.ads.internal.overlay.client.IAdOverlay"); return queryLocalInterface instanceof zzbte ? (zzbte) queryLocalInterface : new zzbtc(zze); } catch (RemoteException e) { com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote AdOverlay.", e); return null; } catch (RemoteCreator.RemoteCreatorException e2) { com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote AdOverlay.", e2); return null; } } }