package com.google.ads.mediation;

import android.os.RemoteException;
import com.google.android.gms.common.internal.w;
import com.google.android.gms.internal.ads.cw;
import com.google.android.gms.internal.ads.hr;
import com.google.android.gms.internal.ads.vu0;
import g7.k;
import j7.f;
import j7.g;
import q7.j;
import s7.n;

/* JADX INFO: loaded from: classes2.dex */
public final class e extends g7.b implements g, f {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final AbstractAdViewAdapter f7712a;

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

    public e(AbstractAdViewAdapter abstractAdViewAdapter, n nVar) {
        this.f7712a = abstractAdViewAdapter;
        this.f7713b = nVar;
    }

    @Override // g7.b
    public final void a() {
        vu0 vu0Var = (vu0) this.f7713b;
        vu0Var.getClass();
        w.d("#008 Must be called on the main UI thread.");
        j.a("Adapter called onAdClosed.");
        try {
            ((cw) vu0Var.f17778b).zzf();
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
        }
    }

    @Override // g7.b
    public final void d(k kVar) {
        ((vu0) this.f7713b).i(kVar);
    }

    @Override // g7.b
    public final void e() {
        vu0 vu0Var = (vu0) this.f7713b;
        vu0Var.getClass();
        w.d("#008 Must be called on the main UI thread.");
        a aVar = (a) vu0Var.f17779c;
        if (((hr) vu0Var.f17780d) == null) {
            if (aVar == null) {
                j.zzl("#007 Could not call remote method.", null);
                return;
            } else if (!aVar.f7706m) {
                j.a("Could not call onAdImpression since setOverrideImpressionRecording is not set to true");
                return;
            }
        }
        j.a("Adapter called onAdImpression.");
        try {
            ((cw) vu0Var.f17778b).zzk();
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
        }
    }

    @Override // g7.b
    public final void g() {
    }

    @Override // g7.b
    public final void h() {
        vu0 vu0Var = (vu0) this.f7713b;
        vu0Var.getClass();
        w.d("#008 Must be called on the main UI thread.");
        j.a("Adapter called onAdOpened.");
        try {
            ((cw) vu0Var.f17778b).zzi();
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
        }
    }

    @Override // g7.b, n7.a
    public final void onAdClicked() {
        vu0 vu0Var = (vu0) this.f7713b;
        vu0Var.getClass();
        w.d("#008 Must be called on the main UI thread.");
        a aVar = (a) vu0Var.f17779c;
        if (((hr) vu0Var.f17780d) == null) {
            if (aVar == null) {
                j.zzl("#007 Could not call remote method.", null);
                return;
            } else if (!aVar.f7707n) {
                j.a("Could not call onAdClicked since setOverrideClickHandling is not set to true");
                return;
            }
        }
        j.a("Adapter called onAdClicked.");
        try {
            ((cw) vu0Var.f17778b).zze();
        } catch (RemoteException e10) {
            j.zzl("#007 Could not call remote method.", e10);
        }
    }
}
