package r7;

import android.app.Activity;
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.mp;
import com.google.android.gms.internal.ads.nu;
import g7.f;
import g7.n;
import g7.z;
import k.h;
import n7.r0;
import n7.y;
import q7.j;

/* JADX INFO: loaded from: classes2.dex */
public abstract class a {
    public static void a(Context context, String str, f fVar, b bVar) {
        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.f14333i.j()).booleanValue()) {
            if (((Boolean) y.f31093e.f31096c.b(ao.f9089tc)).booleanValue()) {
                q7.b.f32218b.execute(new h(context, str, fVar, bVar, 4, 0));
                return;
            }
        }
        new nu(context, str).c(fVar.f26279a, bVar);
    }

    @Nullable
    @Deprecated
    public static a pollAd(@NonNull Context context, @NonNull String str) {
        try {
            r0 r0VarZzk = z.g(context).zzk(str);
            if (r0VarZzk != null) {
                return new nu(context, str, r0VarZzk);
            }
            j.zzl("Failed to obtain an Interstitial Ad from the preloader.", null);
            return null;
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
            return null;
        }
    }

    public abstract void b(Activity activity);

    @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);
}
