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

import android.os.RemoteException;
import androidx.annotation.Nullable;
import java.util.Objects;

/* JADX INFO: loaded from: classes2.dex */
public final class lx implements s7.d {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ cw f13889b;

    public lx(ox oxVar, ax axVar, cw cwVar) {
        this.f13888a = axVar;
        this.f13889b = cwVar;
        Objects.requireNonNull(oxVar);
    }

    @Override // s7.d
    public final void b(g7.a aVar) {
        try {
            this.f13888a.b(aVar.a());
        } catch (RemoteException unused) {
        }
    }

    @Nullable
    public final /* bridge */ /* synthetic */ Object onSuccess(Object obj) {
        com.google.ads.mediation.a aVar = (com.google.ads.mediation.a) obj;
        ax axVar = this.f13888a;
        if (aVar != null) {
            try {
                axVar.d2(new sw(aVar));
            } catch (RemoteException unused) {
            }
            return new ru(this.f13889b, 22);
        }
        q7.j.d("Adapter incorrectly returned a null ad. The onFailure() callback should be called if an adapter fails to load an ad.");
        try {
            axVar.a("Adapter returned null.");
            return null;
        } catch (RemoteException unused2) {
            return null;
        }
    }
}
