package com.google.android.gms.internal.ads;

import android.os.Bundle;
import android.os.RemoteException;
import com.google.ads.mediation.admob.AdMobAdapter;

/* JADX INFO: loaded from: classes2.dex */
public final class gy extends xr {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Object f11908b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public gy(Object obj, int i10) {
        super("com.google.android.gms.ads.internal.formats.client.IOnUnifiedNativeAdLoadedListener");
        this.f11907a = i10;
        this.f11908b = obj;
    }

    @Override // com.google.android.gms.internal.ads.yr
    public final void T0(ds dsVar) {
        int i10 = this.f11907a;
        Object obj = this.f11908b;
        switch (i10) {
            case 0:
                zv1 zv1Var = (zv1) obj;
                ((zs0) zv1Var.f19404b).R2(new dy(dsVar), (String) zv1Var.f19405c);
                break;
            default:
                es esVar = new es(dsVar);
                com.google.ads.mediation.e eVar = (com.google.ads.mediation.e) obj;
                eVar.getClass();
                com.google.ads.mediation.a aVar = new com.google.ads.mediation.a();
                aVar.f7705l = new Bundle();
                aVar.f7694a = esVar.zza();
                aVar.f7695b = esVar.f10909b;
                aVar.f7696c = esVar.zzc();
                aVar.f7697d = esVar.f10910c;
                aVar.f7698e = esVar.zze();
                aVar.f7699f = esVar.zzf();
                aVar.f7700g = esVar.zzg();
                aVar.f7701h = esVar.zzh();
                aVar.f7702i = esVar.zzi();
                aVar.f7704k = esVar.zzk();
                aVar.f7706m = true;
                aVar.f7707n = true;
                g7.x xVar = esVar.f10911d;
                try {
                    ds dsVar2 = esVar.f10908a;
                    if (dsVar2.zzn() != null) {
                        xVar.zza(dsVar2.zzn());
                    }
                    break;
                } catch (RemoteException unused) {
                }
                aVar.f7703j = xVar;
                vu0 vu0Var = (vu0) eVar.f7713b;
                vu0Var.getClass();
                com.google.android.gms.common.internal.w.d("#008 Must be called on the main UI thread.");
                q7.j.a("Adapter called onAdLoaded.");
                vu0Var.f17779c = aVar;
                if (!(eVar.f7712a instanceof AdMobAdapter)) {
                    new g7.x().zza(new lw());
                }
                try {
                    ((cw) vu0Var.f17778b).zzj();
                } catch (RemoteException e10) {
                    q7.j.zzl("#007 Could not call remote method.", e10);
                }
                break;
        }
    }
}
