package i7;

import android.content.Context;
import android.os.RemoteException;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.w;
import com.google.android.gms.internal.ads.ao;
import com.google.android.gms.internal.ads.fk;
import com.google.android.gms.internal.ads.jk;
import com.google.android.gms.internal.ads.mp;
import com.google.android.gms.internal.ads.ts0;
import com.google.android.gms.internal.ads.xu0;
import g7.f;
import g7.n;
import g7.z;
import k.h;
import n7.y;
import q7.j;

/* JADX INFO: loaded from: classes2.dex */
public abstract class b {
    public static void a(Context context, String str, f fVar, ts0 ts0Var) {
        if (context == null) {
            throw new NullPointerException("Context cannot be null.");
        }
        if (str == null) {
            throw new NullPointerException("adUnitId cannot be null.");
        }
        if (fVar == null) {
            throw new NullPointerException("AdRequest cannot be null.");
        }
        w.d("#008 Must be called on the main UI thread.");
        ao.a(context);
        if (((Boolean) mp.f14328d.j()).booleanValue()) {
            if (((Boolean) y.f31093e.f31096c.b(ao.f9089tc)).booleanValue()) {
                q7.b.f32218b.execute(new h(context, str, fVar, ts0Var, 3, 0));
                return;
            }
        }
        new xu0(context, str, fVar.f26279a, ts0Var).a();
    }

    @Nullable
    @Deprecated
    public static b pollAd(@NonNull Context context, @NonNull String str) {
        try {
            jk jkVarZzi = z.g(context).zzi(str);
            if (jkVarZzi != null) {
                return new fk(jkVarZzi, str);
            }
            j.zzl("Failed to obtain an App Open ad from the preloader.", null);
            return null;
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
            return null;
        }
    }

    @Nullable
    public abstract g7.j getFullScreenContentCallback();

    @Nullable
    public abstract n getOnPaidEventListener();

    public abstract void setFullScreenContentCallback(@Nullable g7.j jVar);

    public abstract void setOnPaidEventListener(@Nullable n nVar);
}
