package com.google.android.gms.ads;

import android.content.Context;
import android.os.RemoteException;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.browser.customtabs.d;
import androidx.browser.customtabs.l;
import androidx.browser.customtabs.z;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.w;
import com.google.android.gms.internal.ads.az;
import com.google.android.gms.internal.ads.h20;
import k8.b;
import l7.a;
import n7.b3;
import q7.j;

/* JADX INFO: loaded from: classes2.dex */
public class MobileAds {
    @Nullable
    public static a getInitializationStatus() {
        return b3.c().e();
    }

    @Nullable
    public static z registerCustomTabsSession(@NonNull Context context, @NonNull l lVar, @NonNull String str, @Nullable d dVar) {
        b3.c();
        w.d("#008 Must be called on the main UI thread.");
        h20 h20VarZza = az.zza(context);
        if (h20VarZza == null) {
            j.b("Internal error, query info generator is null.");
            return null;
        }
        try {
            return (z) b.O(h20VarZza.k0(new b(context), new b(lVar), str, new b(dVar)));
        } catch (RemoteException | IllegalArgumentException unused) {
            return null;
        }
    }

    @KeepForSdk
    private static void setPlugin(String str) {
        b3.c().f(str);
    }

    @KeepForSdk
    private static void stop() {
        b3.c().d();
    }
}
