package n7;

import android.content.Context;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.google.android.gms.ads.internal.util.client.zzr;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.ads.dynamite.ModuleDescriptor;
import com.google.android.gms.internal.ads.aj;
import com.google.android.gms.internal.ads.ao;
import com.google.android.gms.internal.ads.dz;
import com.google.android.gms.internal.ads.ez;
import com.google.android.gms.internal.ads.uq;
import com.google.android.gms.internal.ads.vq;
import com.google.android.gms.internal.ads.wq;
import com.google.android.gms.internal.ads.xq;
import com.google.android.gms.internal.ads.zq;

/* JADX INFO: loaded from: classes2.dex */
public final class t extends w {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ FrameLayout f31022a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ FrameLayout f31023b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Context f31024c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ u f31025d;

    public t(u uVar, FrameLayout frameLayout, FrameLayout frameLayout2, Context context) {
        this.f31022a = frameLayout;
        this.f31023b = frameLayout2;
        this.f31024c = context;
        this.f31025d = uVar;
    }

    @Override // n7.w
    public final Object zza() {
        u.a(this.f31024c, "native_ad_view_delegate");
        return new l3();
    }

    @Override // n7.w
    @Nullable
    public final Object zzb() throws RemoteException {
        Context context = this.f31024c;
        ao.a(context);
        boolean zBooleanValue = ((Boolean) y.f31093e.f31096c.b(ao.Tb)).booleanValue();
        u uVar = this.f31025d;
        FrameLayout frameLayout = this.f31023b;
        FrameLayout frameLayout2 = this.f31022a;
        if (!zBooleanValue) {
            return uVar.f31044d.zza(context, frameLayout2, frameLayout);
        }
        try {
            k8.b bVar = new k8.b(context);
            k8.b bVar2 = new k8.b(frameLayout2);
            k8.b bVar3 = new k8.b(frameLayout);
            xq xqVar = (xq) ((zq) hb.a.K0(context, "com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl", s.f31019a));
            Parcel parcelO = xqVar.O();
            aj.d(parcelO, bVar);
            aj.d(parcelO, bVar2);
            aj.d(parcelO, bVar3);
            parcelO.writeInt(ModuleDescriptor.MODULE_VERSION);
            Parcel parcelB0 = xqVar.B0(1, parcelO);
            IBinder strongBinder = parcelB0.readStrongBinder();
            parcelB0.recycle();
            int i10 = vq.f17748a;
            if (strongBinder == null) {
                return null;
            }
            IInterface iInterfaceQueryLocalInterface = strongBinder.queryLocalInterface("com.google.android.gms.ads.internal.formats.client.INativeAdViewDelegate");
            return iInterfaceQueryLocalInterface instanceof wq ? (wq) iInterfaceQueryLocalInterface : new uq(strongBinder);
        } catch (RemoteException | zzr | NullPointerException e10) {
            ez ezVarA = dz.a(context);
            uVar.getClass();
            ezVarA.d("ClientApiBroker.createNativeAdViewDelegate", e10);
            return null;
        }
    }

    @Override // n7.w
    public final Object zzc(j1 j1Var) {
        return j1Var.U0(new k8.b(this.f31022a), new k8.b(this.f31023b));
    }
}
