package com.google.android.gms.internal.ads; import android.content.Context; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import android.widget.FrameLayout; 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 zzbhv extends RemoteCreator { public zzbhv() { super("com.google.android.gms.ads.NativeAdViewDelegateCreatorImpl"); } @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.formats.client.INativeAdViewDelegateCreator"); return queryLocalInterface instanceof zzbgd ? (zzbgd) queryLocalInterface : new zzbgb(iBinder); } @Nullable public final zzbga zza(Context context, FrameLayout frameLayout, FrameLayout frameLayout2) { try { IBinder zze = ((zzbgd) getRemoteCreatorInstance(context)).zze(ObjectWrapper.wrap(context), ObjectWrapper.wrap(frameLayout), ObjectWrapper.wrap(frameLayout2), 244410000); if (zze == null) { return null; } IInterface queryLocalInterface = zze.queryLocalInterface("com.google.android.gms.ads.internal.formats.client.INativeAdViewDelegate"); return queryLocalInterface instanceof zzbga ? (zzbga) queryLocalInterface : new zzbfy(zze); } catch (RemoteException e) { e = e; com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote NativeAdViewDelegate.", e); return null; } catch (RemoteCreator.RemoteCreatorException e2) { e = e2; com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote NativeAdViewDelegate.", e); return null; } } }