package com.google.android.gms.internal.ads; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import android.view.View; import androidx.annotation.Nullable; import com.google.android.gms.dynamic.ObjectWrapper; import com.google.android.gms.dynamic.RemoteCreator; import java.util.HashMap; /* loaded from: classes3.dex */ public final class zzbhw extends RemoteCreator { public zzbhw() { super("com.google.android.gms.ads.NativeAdViewHolderDelegateCreatorImpl"); } @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.INativeAdViewHolderDelegateCreator"); return queryLocalInterface instanceof zzbgj ? (zzbgj) queryLocalInterface : new zzbgh(iBinder); } @Nullable public final zzbgg zza(View view, HashMap hashMap, HashMap hashMap2) { try { IBinder zze = ((zzbgj) getRemoteCreatorInstance(view.getContext())).zze(ObjectWrapper.wrap(view), ObjectWrapper.wrap(hashMap), ObjectWrapper.wrap(hashMap2)); if (zze == null) { return null; } IInterface queryLocalInterface = zze.queryLocalInterface("com.google.android.gms.ads.internal.formats.client.INativeAdViewHolderDelegate"); return queryLocalInterface instanceof zzbgg ? (zzbgg) queryLocalInterface : new zzbge(zze); } catch (RemoteException e) { e = e; com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote NativeAdViewHolderDelegate.", e); return null; } catch (RemoteCreator.RemoteCreatorException e2) { e = e2; com.google.android.gms.ads.internal.util.client.zzo.zzk("Could not create remote NativeAdViewHolderDelegate.", e); return null; } } }