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

import android.content.Context;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import androidx.annotation.Nullable;
import com.google.android.gms.ads.internal.util.client.zzr;

/* JADX INFO: loaded from: classes2.dex */
public abstract class d10 {
    @Nullable
    public static final s00 zza(Context context, String str, wv wvVar) {
        try {
            IBinder iBinderW1 = ((w00) hb.a.K0(context, "com.google.android.gms.ads.rewarded.ChimeraRewardedAdCreatorImpl", c10.f9689a)).w1(new k8.b(context), str, wvVar);
            if (iBinderW1 == null) {
                return null;
            }
            IInterface iInterfaceQueryLocalInterface = iBinderW1.queryLocalInterface("com.google.android.gms.ads.internal.rewarded.client.IRewardedAd");
            return iInterfaceQueryLocalInterface instanceof s00 ? (s00) iInterfaceQueryLocalInterface : new q00(iBinderW1);
        } catch (RemoteException e10) {
            e = e10;
            q7.j.zzl("#007 Could not call remote method.", e);
            return null;
        } catch (zzr e11) {
            e = e11;
            q7.j.zzl("#007 Could not call remote method.", e);
            return null;
        }
    }
}
