package com.google.android.gms.internal.ads; import android.app.Activity; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import androidx.browser.customtabs.CustomTabsIntent; import com.google.android.gms.ads.internal.overlay.AdOverlayInfoParcel; import com.google.android.gms.ads.internal.util.client.VersionInfoParcel; import com.google.android.gms.ads.mediation.MediationAdRequest; import com.google.android.gms.ads.mediation.MediationInterstitialAdapter; import com.google.android.gms.ads.mediation.MediationInterstitialListener; /* loaded from: classes3.dex */ public final class zzbrw implements MediationInterstitialAdapter { private Activity zza; private MediationInterstitialListener zzb; private Uri zzc; @Override // com.google.android.gms.ads.mediation.MediationAdapter public final void onDestroy() { com.google.android.gms.ads.internal.util.client.zzo.zze("Destroying AdMobCustomTabsAdapter adapter."); } @Override // com.google.android.gms.ads.mediation.MediationAdapter public final void onPause() { com.google.android.gms.ads.internal.util.client.zzo.zze("Pausing AdMobCustomTabsAdapter adapter."); } @Override // com.google.android.gms.ads.mediation.MediationAdapter public final void onResume() { com.google.android.gms.ads.internal.util.client.zzo.zze("Resuming AdMobCustomTabsAdapter adapter."); } @Override // com.google.android.gms.ads.mediation.MediationInterstitialAdapter public final void requestInterstitialAd(Context context, MediationInterstitialListener mediationInterstitialListener, Bundle bundle, MediationAdRequest mediationAdRequest, Bundle bundle2) { this.zzb = mediationInterstitialListener; if (mediationInterstitialListener == null) { com.google.android.gms.ads.internal.util.client.zzo.zzj("Listener not set for mediation. Returning."); return; } if (!(context instanceof Activity)) { com.google.android.gms.ads.internal.util.client.zzo.zzj("AdMobCustomTabs can only work with Activity context. Bailing out."); this.zzb.onAdFailedToLoad(this, 0); return; } if (!zzbdm.zzg(context)) { com.google.android.gms.ads.internal.util.client.zzo.zzj("Default browser does not support custom tabs. Bailing out."); this.zzb.onAdFailedToLoad(this, 0); return; } String string = bundle.getString("tab_url"); if (TextUtils.isEmpty(string)) { com.google.android.gms.ads.internal.util.client.zzo.zzj("The tab_url retrieved from mediation metadata is empty. Bailing out."); this.zzb.onAdFailedToLoad(this, 0); } else { this.zza = (Activity) context; this.zzc = Uri.parse(string); this.zzb.onAdLoaded(this); } } @Override // com.google.android.gms.ads.mediation.MediationInterstitialAdapter public final void showInterstitial() { CustomTabsIntent build = new CustomTabsIntent.Builder().build(); build.intent.setData(this.zzc); com.google.android.gms.ads.internal.util.zzs.zza.post(new zzbrv(this, new AdOverlayInfoParcel(new com.google.android.gms.ads.internal.overlay.zzc(build.intent, null), null, new zzbru(this), null, new VersionInfoParcel(0, 0, false), null, null, ""))); com.google.android.gms.ads.internal.zzv.zzp().zzq(); } }