package com.mobon.sdk; import android.app.Activity; import android.app.Dialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.net.http.SslError; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.text.TextUtils; import android.view.MotionEvent; import android.view.View; import android.webkit.CookieManager; import android.webkit.SslErrorHandler; import android.webkit.WebChromeClient; import android.webkit.WebResourceError; import android.webkit.WebResourceRequest; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import com.google.android.gms.ads.RequestConfiguration; import com.mobon.sdk.e; import com.unity3d.services.core.device.reader.JsonStorageKeyNames; import h5.i0; import java.io.IOException; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes2.dex */ public class b extends Dialog implements View.OnClickListener { /* renamed from: a, reason: collision with root package name */ private final Context f7508a; /* renamed from: b, reason: collision with root package name */ private LinearLayout f7509b; /* renamed from: c, reason: collision with root package name */ private RelativeLayout f7510c; /* renamed from: d, reason: collision with root package name */ private h7.d f7511d; /* renamed from: e, reason: collision with root package name */ private String f7512e; /* renamed from: f, reason: collision with root package name */ private boolean f7513f; /* renamed from: g, reason: collision with root package name */ private boolean f7514g; /* renamed from: h, reason: collision with root package name */ private float f7515h; /* renamed from: i, reason: collision with root package name */ private final AtomicInteger f7516i; /* renamed from: j, reason: collision with root package name */ private boolean f7517j; /* renamed from: k, reason: collision with root package name */ private String f7518k; /* renamed from: l, reason: collision with root package name */ private String f7519l; /* renamed from: m, reason: collision with root package name */ private int f7520m; /* renamed from: n, reason: collision with root package name */ private f7.b f7521n; /* renamed from: o, reason: collision with root package name */ private String f7522o; /* renamed from: p, reason: collision with root package name */ private WebView f7523p; /* renamed from: q, reason: collision with root package name */ private f7.h f7524q; /* renamed from: r, reason: collision with root package name */ private boolean f7525r; /* renamed from: s, reason: collision with root package name */ private boolean f7526s; /* renamed from: t, reason: collision with root package name */ private String f7527t; /* renamed from: u, reason: collision with root package name */ private boolean f7528u; /* renamed from: v, reason: collision with root package name */ private boolean f7529v; class a implements x6.e { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ ImageView f7530a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ String[] f7531b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ int f7532c; /* renamed from: d, reason: collision with root package name */ final /* synthetic */ boolean f7533d; a(ImageView imageView, String[] strArr, int i10, boolean z10) { this.f7530a = imageView; this.f7531b = strArr; this.f7532c = i10; this.f7533d = z10; } @Override // x6.e public boolean a(h6.e eVar, Object obj, y6.h hVar, boolean z10) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.f7530a.getLayoutParams(); layoutParams.width = -1; this.f7530a.setLayoutParams(layoutParams); ((b6.i) ((b6.i) ((b6.i) b6.e.t(b.this.f7508a).u(this.f7531b[this.f7532c]).x()).o()).v()).A0(this.f7530a); return false; } @Override // x6.e /* renamed from: c, reason: merged with bridge method [inline-methods] */ public boolean b(Drawable drawable, Object obj, y6.h hVar, e6.a aVar, boolean z10) { try { if (this.f7533d) { if (this.f7530a.getDrawable() != null && com.mobon.sdk.a.x(((BitmapDrawable) this.f7530a.getDrawable()).getBitmap()) == 16777215) { if (b.this.f7511d != null && !b.this.f7526s) { b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No Image"); } return false; } if (!com.mobon.sdk.a.r(b.this.f7508a)) { return false; } b.super.show(); } ((b6.i) ((b6.i) ((b6.i) b6.e.t(b.this.f7508a).u(this.f7531b[this.f7532c]).x()).o()).v()).A0(this.f7530a); } catch (Exception e10) { e10.printStackTrace(); if (b.this.f7511d != null && !b.this.f7526s) { b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No Image"); } } return false; } } /* renamed from: com.mobon.sdk.b$b, reason: collision with other inner class name */ class C0102b implements x6.e { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ String f7535a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ ImageView f7536b; C0102b(String str, ImageView imageView) { this.f7535a = str; this.f7536b = imageView; } @Override // x6.e public boolean a(h6.e eVar, Object obj, y6.h hVar, boolean z10) { ((b6.i) ((b6.i) ((b6.i) b6.e.t(b.this.f7508a).u(this.f7535a).x()).o()).v()).A0(this.f7536b); return false; } @Override // x6.e /* renamed from: c, reason: merged with bridge method [inline-methods] */ public boolean b(Drawable drawable, Object obj, y6.h hVar, e6.a aVar, boolean z10) { ((b6.i) ((b6.i) ((b6.i) b6.e.t(b.this.f7508a).u(this.f7535a).x()).o()).v()).A0(this.f7536b); return false; } } class c implements View.OnClickListener { c() { } @Override // android.view.View.OnClickListener public void onClick(View view) { f7.m.b(b.this.f7508a, b.this.f7522o, false); } } class d implements View.OnClickListener { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ boolean f7539a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ JSONObject f7540b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ String f7541c; /* renamed from: d, reason: collision with root package name */ final /* synthetic */ String f7542d; /* renamed from: e, reason: collision with root package name */ final /* synthetic */ String f7543e; /* renamed from: f, reason: collision with root package name */ final /* synthetic */ String f7544f; d(boolean z10, JSONObject jSONObject, String str, String str2, String str3, String str4) { this.f7539a = z10; this.f7540b = jSONObject; this.f7541c = str; this.f7542d = str2; this.f7543e = str3; this.f7544f = str4; } @Override // android.view.View.OnClickListener public void onClick(View view) { if (b.this.f7511d != null) { b.this.f7511d.onClickEvent(e.a.ADCLICK); } if (!this.f7539a) { f7.m.b(b.this.f7508a, this.f7544f, false); return; } try { String optString = this.f7540b.optString("site_icon"); if (!optString.contains(".png")) { optString = this.f7540b.optString("mimg_250_250"); if (TextUtils.isEmpty(optString)) { optString = this.f7540b.optString("img"); } } f7.m.g(b.this.f7508a, this.f7541c, optString, this.f7542d); new d7.a(b.this.f7508a).c(this.f7541c, this.f7543e); f7.m.b(b.this.f7508a, this.f7544f, true); } catch (Exception e10) { e10.printStackTrace(); } } } class e implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ com.mobon.sdk.n f7546a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ JSONObject f7547b; e(com.mobon.sdk.n nVar, JSONObject jSONObject) { this.f7546a = nVar; this.f7547b = jSONObject; } @Override // java.lang.Runnable public void run() { b.this.f7509b.addView(this.f7546a); this.f7546a.setMainLayout(this.f7547b.toString()); this.f7546a.C0(this.f7547b.toString(), false); } } class f implements h5.j { class a implements Runnable { a() { } @Override // java.lang.Runnable public void run() { b.this.I(); } } f() { } @Override // h5.j public void a(h5.i iVar, i0 i0Var) { if (i0Var == null || !i0Var.S() || i0Var.c() == null) { f7.f.b("API_MOBON_BACON_URL_LIST ERROR", "error => " + i0Var.Y()); if (b.this.f7511d == null || b.this.f7526s) { return; } } else { try { f7.f.a("call API_MOBON_BACON_URL_LIST"); String R = i0Var.c().R(); if (TextUtils.isEmpty(R)) { return; } f7.l.i(b.this.f7508a, "Key.BACON_URL_LIST_DATA", R); f7.l.h(b.this.f7508a, "Key.BACON_LIST_DOWNLOAD_SAVE_TIME", System.currentTimeMillis()); new Handler(Looper.getMainLooper()).post(new a()); return; } catch (Exception e10) { f7.f.b("API_MOBON_BACON_URL_LIST ERROR", "error => " + e10.toString()); if (b.this.f7511d == null || b.this.f7526s) { return; } } } b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No fill"); } @Override // h5.j public void b(h5.i iVar, IOException iOException) { f7.f.b("API_MOBON_BACON_URL_LIST ERROR", "error => " + iOException.toString()); } } class g implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ String f7551a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ String f7552b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ CookieManager f7553c; class a implements View.OnTouchListener { a(g gVar) { } @Override // android.view.View.OnTouchListener public boolean onTouch(View view, MotionEvent motionEvent) { return motionEvent.getAction() == 2; } } /* renamed from: com.mobon.sdk.b$g$b, reason: collision with other inner class name */ class C0103b extends WebChromeClient { /* renamed from: com.mobon.sdk.b$g$b$a */ class a extends WebViewClient { a() { } @Override // android.webkit.WebViewClient public boolean shouldOverrideUrlLoading(WebView webView, String str) { Intent intent = new Intent("android.intent.action.VIEW"); if (str.contains("mediacategory.com")) { str = str + "&au_id=" + f7.l.e(b.this.f7508a, "Key.AUID"); } intent.setData(Uri.parse(str)); intent.addFlags(268435456); try { b.this.f7508a.startActivity(intent); if (b.this.f7511d != null) { b.this.f7511d.onClickEvent(e.a.ADCLICK); } if (b.this.f7523p != null) { b.this.f7523p.onResume(); b.this.f7523p.loadUrl("javascript:mixerClickFn();"); } } catch (ActivityNotFoundException unused) { b.this.f7508a.startActivity(Intent.createChooser(intent, "Title")); } if (b.this.f7523p == null || !str.contains("//img.mobon.net/ad/linfo.php")) { return true; } b.this.f7523p.goBack(); return true; } } C0103b() { } /* JADX WARN: Code restructure failed: missing block: B:8:0x0052, code lost: if (r2.equals("AdapterFailCallback") == false) goto L28; */ @Override // android.webkit.WebChromeClient /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public void onConsoleMessage(java.lang.String r2, int r3, java.lang.String r4) { /* Method dump skipped, instructions count: 286 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: com.mobon.sdk.b.g.C0103b.onConsoleMessage(java.lang.String, int, java.lang.String):void"); } @Override // android.webkit.WebChromeClient public boolean onCreateWindow(WebView webView, boolean z10, boolean z11, Message message) { WebView webView2 = new WebView(b.this.f7508a); webView.addView(webView2); ((WebView.WebViewTransport) message.obj).setWebView(webView2); message.sendToTarget(); webView2.setWebViewClient(new a()); return true; } } class c extends WebViewClient { c() { } @Override // android.webkit.WebViewClient public void onPageFinished(WebView webView, String str) { if (!str.contains("/servlet/auid")) { b.this.f7509b.setVisibility(0); } else if (g.this.f7551a.equals("mbadapter")) { g gVar = g.this; b.this.K(gVar.f7552b); } else { g gVar2 = g.this; b.this.L(gVar2.f7552b); } } @Override // android.webkit.WebViewClient public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) { CharSequence description; int errorCode; int errorCode2; int errorCode3; super.onReceivedError(webView, webResourceRequest, webResourceError); StringBuilder sb = new StringBuilder(); sb.append("!!!!!!!!!!!!!!!!!!!!!!! onReceivedError : "); description = webResourceError.getDescription(); sb.append((Object) description); f7.f.a(sb.toString()); f7.f.a("!!!!!!!!!!!!!!!!!!!!!!! onReceivedError url : " + webResourceRequest.getUrl()); StringBuilder sb2 = new StringBuilder(); sb2.append("!!!!!!!!!!!!!!!!!!!!!!! onReceivedError getErrorCode : "); errorCode = webResourceError.getErrorCode(); sb2.append(errorCode); f7.f.a(sb2.toString()); errorCode2 = webResourceError.getErrorCode(); if (errorCode2 != -1) { errorCode3 = webResourceError.getErrorCode(); if (errorCode3 == -10 || b.this.f7526s) { return; } if (b.this.f7523p != null) { b.this.f7523p.loadUrl("about:blank"); b.this.f7523p.onPause(); } if (b.this.f7509b != null) { b.this.f7509b.removeAllViews(); } if ((b.this.f7524q != null ? b.this.f7524q.j() : false) || b.this.f7511d == null) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); } } @Override // android.webkit.WebViewClient public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) { boolean z10; sslErrorHandler.cancel(); f7.f.a("!!!!!!!!!!!!!!!!!!!!!!! onReceivedSslError : "); if (b.this.f7523p == null || b.this.f7526s) { return; } b.this.f7523p.onPause(); b.this.f7509b.removeAllViews(); if (b.this.f7524q != null) { b.this.O(true); z10 = b.this.f7524q.j(); } else { z10 = false; } if (z10 || b.this.f7511d == null) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); } @Override // android.webkit.WebViewClient public boolean shouldOverrideUrlLoading(WebView webView, String str) { Intent intent = new Intent("android.intent.action.VIEW"); if (str.contains("mediacategory.com")) { str = str + "&au_id=" + f7.l.e(b.this.f7508a, "Key.AUID"); } intent.setData(Uri.parse(str)); intent.addFlags(268435456); try { b.this.f7508a.startActivity(intent); if (b.this.f7511d != null) { b.this.f7511d.onClickEvent(e.a.ADCLICK); } if (b.this.f7523p == null) { return true; } b.this.f7523p.onResume(); b.this.f7523p.loadUrl("javascript:mixerClickFn();"); return true; } catch (ActivityNotFoundException unused) { b.this.f7508a.startActivity(Intent.createChooser(intent, "title")); return super.shouldOverrideUrlLoading(webView, str); } } } g(String str, String str2, CookieManager cookieManager) { this.f7551a = str; this.f7552b = str2; this.f7553c = cookieManager; } @Override // java.lang.Runnable public void run() { if (b.this.f7523p == null) { if (b.this.f7524q != null ? b.this.f7524q.j() : false) { return; } b.this.f7509b.removeAllViews(); if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); return; } WebSettings settings = b.this.f7523p.getSettings(); settings.setJavaScriptEnabled(true); settings.setAppCacheEnabled(true); settings.setBuiltInZoomControls(false); settings.setLoadsImagesAutomatically(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setSupportMultipleWindows(true); String path = b.this.f7508a.getDir("database", 0).getPath(); settings.setDatabaseEnabled(true); settings.setDatabasePath(path); settings.setDomStorageEnabled(true); settings.setBlockNetworkLoads(false); settings.setMixedContentMode(0); b.this.f7523p.setVerticalScrollBarEnabled(false); b.this.f7523p.setHorizontalScrollBarEnabled(false); b.this.f7523p.setBackgroundColor(-1); b.this.f7523p.setOnTouchListener(new a(this)); b.this.f7523p.setWebChromeClient(new C0103b()); b.this.f7523p.setWebViewClient(new c()); this.f7553c.setAcceptThirdPartyCookies(b.this.f7523p, true); String cookie = this.f7553c.getCookie("https://mediacategory.com"); String e10 = f7.l.e(b.this.f7508a, "Key.AUID"); if (!TextUtils.isEmpty(cookie) && !TextUtils.isEmpty(e10) && ((cookie == null || cookie.contains(e10)) && cookie.contains(e10))) { if (this.f7551a.equals("mbadapter")) { b.this.K(this.f7552b); return; } else { b.this.L(this.f7552b); return; } } b.this.f7509b.setVisibility(4); String str = com.mobon.sdk.p.f7783a + "www.mediacategory.com/servlet/auid?adid=" + f7.l.e(b.this.f7508a, "Key.ADID"); if (b.this.f7523p != null) { b.this.f7523p.onResume(); b.this.f7523p.loadUrl(str); } } } class h implements Runnable { h() { } @Override // java.lang.Runnable public void run() { if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } } class i implements Runnable { i() { } @Override // java.lang.Runnable public void run() { b.this.E(); } } class j implements Runnable { j() { } @Override // java.lang.Runnable public void run() { b.this.H(true); } } class k implements Runnable { k() { } @Override // java.lang.Runnable public void run() { b.this.G(); } } class l implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ String f7562a; l(String str) { this.f7562a = str; } @Override // java.lang.Runnable public void run() { try { b.this.S(new JSONObject(this.f7562a), false); f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } catch (JSONException e10) { e10.toString(); } } } class m implements h7.c { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ boolean f7564a; class a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ JSONObject f7566a; /* renamed from: com.mobon.sdk.b$m$a$a, reason: collision with other inner class name */ class C0104a implements h7.e { /* renamed from: com.mobon.sdk.b$m$a$a$a, reason: collision with other inner class name */ class RunnableC0105a implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ f7.b f7569a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ String f7570b; RunnableC0105a(f7.b bVar, String str) { this.f7569a = bVar; this.f7570b = str; } @Override // java.lang.Runnable public void run() { b.this.a(this.f7569a.h(), this.f7570b); } } /* renamed from: com.mobon.sdk.b$m$a$a$b, reason: collision with other inner class name */ class RunnableC0106b implements Runnable { RunnableC0106b() { } @Override // java.lang.Runnable public void run() { if (b.this.isShowing()) { b.this.dismiss(); } } } C0104a() { } @Override // h7.e public void a(String str, f7.b bVar) { if (b.this.f7511d == null) { f7.f.a("Interstitial mInterstitialAdCallback null"); } if (TextUtils.isEmpty(str) || str.contains("userid=shoppul123")) { if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); return; } try { f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", str); f7.l.h(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA_TIME", System.currentTimeMillis()); f7.f.a("Interstitial getMobonAdData adapter : " + bVar.h()); } catch (Exception e10) { e10.printStackTrace(); } if (bVar.h().toLowerCase().equals("appbacon")) { b.this.f7519l = bVar.k(); b.this.J(str); if (b.this.f7511d == null || b.this.f7525r) { return; } b.this.f7525r = true; b.this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); return; } if (!bVar.h().toLowerCase().equals("mbadapter") && !bVar.h().toLowerCase().equals("mbmixadapter")) { JSONObject jSONObject = new JSONObject(str); if (jSONObject.getJSONArray("client").getJSONObject(0).optInt("length") == 0) { f7.f.a("Interstitial getMobonAdData nofill"); f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); b.this.O(true); return; } f7.f.a("Interstitial getMobonAdData onLoadedAdInfo"); if (b.this.f7511d != null && !b.this.f7525r) { b.this.f7525r = true; b.this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } if (b.this.isShowing()) { b.this.S(jSONObject, false); } b.this.f7521n = null; } new Handler().postDelayed(new RunnableC0105a(bVar, bVar.k()), 10L); b.this.f7521n = null; } @Override // h7.e public void b() { b.this.f7511d.onClosed(); } @Override // h7.e public void c(String str) { if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); } @Override // h7.e public void d(f7.b bVar) { f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); b.this.f7521n = bVar; if (b.this.f7511d != null && !b.this.f7525r) { b.this.f7525r = true; b.this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } if (b.this.isShowing()) { b.this.f7521n.y(); new Handler().postDelayed(new RunnableC0106b(), 200L); } if (b.this.f7511d != null) { b.this.f7511d.onOpened(); } } @Override // h7.e public void e() { } @Override // h7.e public void onAdClicked() { b.this.f7511d.onClickEvent(e.a.ADCLICK); } @Override // h7.e public void onAdClosed() { b.this.f7511d.onClickEvent(e.a.CLOSE); b.this.f7511d.onClosed(); } @Override // h7.e public void onAdImpression() { } } a(JSONObject jSONObject) { this.f7566a = jSONObject; } @Override // java.lang.Runnable public void run() { m mVar = m.this; if (!mVar.f7564a) { b.this.S(this.f7566a, false); f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); return; } if (com.mobon.sdk.e.f7583a) { b bVar = b.this; bVar.f7524q = new f7.h(bVar.f7508a, this.f7566a, b.this.f7512e); b.this.f7524q.a(new C0104a()); return; } if (TextUtils.isEmpty(this.f7566a.toString())) { f7.f.a("Interstitial getMobonAdData1 nofill"); if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); if (b.this.f7526s) { return; } b.this.f7511d.onLoadedAdInfo(false, "No fill"); return; } f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", this.f7566a.toString()); f7.l.h(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA_TIME", System.currentTimeMillis()); b.this.f7521n = null; f7.f.a("Interstitial getMobonAdData1 onLoadedAdInfo"); if (b.this.f7511d == null || b.this.f7525r) { return; } b.this.f7525r = true; b.this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } } m(boolean z10) { this.f7564a = z10; } @Override // h7.c public void a(boolean z10, JSONObject jSONObject, String str) { if (z10) { new Handler(Looper.getMainLooper()).post(new a(jSONObject)); } else { if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, str); } } } class n implements Runnable { n() { } @Override // java.lang.Runnable public void run() { if (b.this.f7521n.y() || b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); f7.f.a("Intersitial onLoadedAdInfo no fill"); b.this.f7511d.onLoadedAdInfo(false, "No fill"); } } class o implements Runnable { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ String f7574a; class a implements Runnable { a() { } @Override // java.lang.Runnable public void run() { if (b.this.f7523p != null) { b.this.f7523p.onResume(); b.this.f7523p.setFocusable(true); } } } o(String str) { this.f7574a = str; } @Override // java.lang.Runnable public void run() { b bVar; JSONObject jSONObject; try { f7.l.i(b.this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); if (b.this.f7524q != null) { String g10 = b.this.f7524q.g(); if (!TextUtils.equals(g10, "mbadapter") && !TextUtils.equals(g10, "mbmixadapter")) { if (TextUtils.equals(g10, "appbacon")) { f7.f.a("appbacon call"); b.this.S(new JSONObject(this.f7574a), true); return; } else { f7.f.a("mediationManager not null call"); bVar = b.this; jSONObject = new JSONObject(this.f7574a); } } if (b.this.f7526s) { return; } f7.f.a(g10 + " call"); if (com.mobon.sdk.a.r(b.this.f7508a)) { if (!b.this.isShowing()) { b.super.show(); } new Handler().post(new a()); return; } return; } f7.f.a("mediationManager null call"); bVar = b.this; jSONObject = new JSONObject(this.f7574a); bVar.S(jSONObject, false); } catch (JSONException e10) { e10.printStackTrace(); } } } class p implements x6.e { p(b bVar) { } @Override // x6.e public boolean a(h6.e eVar, Object obj, y6.h hVar, boolean z10) { return false; } @Override // x6.e /* renamed from: c, reason: merged with bridge method [inline-methods] */ public boolean b(Drawable drawable, Object obj, y6.h hVar, e6.a aVar, boolean z10) { return false; } } class q implements x6.e { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ boolean f7577a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ String f7578b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ String f7579c; /* renamed from: d, reason: collision with root package name */ final /* synthetic */ ImageView f7580d; class a implements Runnable { a() { } @Override // java.lang.Runnable public void run() { if (q.this.f7580d.getDrawable() != null && com.mobon.sdk.a.x(((BitmapDrawable) q.this.f7580d.getDrawable()).getBitmap()) == 16777215) { if (b.this.f7511d == null || b.this.f7526s) { return; } b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No Image"); return; } if (com.mobon.sdk.a.r(b.this.f7508a)) { b.super.show(); d7.a aVar = new d7.a(b.this.f7508a); q qVar = q.this; aVar.c(qVar.f7578b, qVar.f7579c); } } } q(boolean z10, String str, String str2, ImageView imageView) { this.f7577a = z10; this.f7578b = str; this.f7579c = str2; this.f7580d = imageView; } @Override // x6.e public boolean a(h6.e eVar, Object obj, y6.h hVar, boolean z10) { if (b.this.f7511d != null && !b.this.f7526s) { b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No Image"); } b.this.dismiss(); if (this.f7577a) { new d7.a(b.this.f7508a).c(this.f7578b, this.f7579c); } return false; } @Override // x6.e /* renamed from: c, reason: merged with bridge method [inline-methods] */ public boolean b(Drawable drawable, Object obj, y6.h hVar, e6.a aVar, boolean z10) { try { new Handler().post(new a()); } catch (Exception e10) { e10.printStackTrace(); if (b.this.f7511d != null && !b.this.f7526s) { b.this.O(true); b.this.f7511d.onLoadedAdInfo(false, "No Image"); } } return false; } } public b(Context context) { super(context, com.mobon.sdk.m.f7694a); this.f7511d = null; this.f7514g = false; this.f7516i = new AtomicInteger(0); this.f7518k = null; this.f7519l = null; this.f7520m = -1; this.f7525r = false; this.f7526s = false; this.f7527t = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED; this.f7528u = false; this.f7529v = false; this.f7508a = context; requestWindowFeature(1); String e10 = f7.l.e(context, "Key.INTERSTITIAL_POPUP_TYPE"); this.f7512e = e10; N(e10.equals(e.b.FULL.toString())); } private boolean D() { if (System.currentTimeMillis() <= f7.l.d(this.f7508a, "Key.BACON_LIST_DOWNLOAD_SAVE_TIME") + 3600000) { return true; } f7.i.a(this.f7508a, com.mobon.sdk.p.f7783a + "www.mediacategory.com/servlet/API/ver2.0/JSON/sNo/" + this.f7519l + "/BACON?type=availableUrlList", null).z(new f()); return false; } /* JADX INFO: Access modifiers changed from: private */ public void J(String str) { this.f7513f = true; if (TextUtils.isEmpty(this.f7519l)) { h7.d dVar = this.f7511d; if (dVar == null || this.f7526s) { return; } dVar.onLoadedAdInfo(false, "Empty bacon UnitId"); O(true); return; } if (!f7.m.f("com.nhn.android.search", this.f7508a)) { h7.d dVar2 = this.f7511d; if (dVar2 == null || this.f7526s) { return; } dVar2.onLoadedAdInfo(false, "No fill"); O(true); return; } if (D()) { String i10 = com.mobon.sdk.a.i(this.f7508a); if (!TextUtils.isEmpty(i10)) { f7.l.i(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", i10); f7.l.h(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA_TIME", System.currentTimeMillis()); return; } h7.d dVar3 = this.f7511d; if (dVar3 == null || this.f7526s) { return; } dVar3.onLoadedAdInfo(false, "wrong bacon Unit or No fill"); O(true); } } /* JADX INFO: Access modifiers changed from: private */ public void K(String str) { if (this.f7523p == null) { f7.h hVar = this.f7524q; if (hVar != null ? hVar.j() : false) { return; } this.f7509b.removeAllViews(); if (this.f7511d == null || this.f7526s) { return; } O(true); if (this.f7526s) { return; } this.f7511d.onLoadedAdInfo(false, "No fill"); return; } String b10 = com.mobon.sdk.o.b(this.f7508a, str, "320_480"); this.f7527t = str; WebView webView = this.f7523p; if (webView != null) { webView.onResume(); this.f7523p.loadDataWithBaseURL("https://mediacategory.com", b10, "text/html; charset=utf-8", "UTF-8", null); } if (this.f7511d == null || this.f7525r) { return; } this.f7525r = true; new Handler().postDelayed(new h(), 500L); } /* JADX INFO: Access modifiers changed from: private */ public void L(String str) { if (this.f7523p == null) { f7.h hVar = this.f7524q; if (hVar != null ? hVar.j() : false) { return; } this.f7509b.removeAllViews(); if (this.f7511d == null || this.f7526s) { return; } O(true); if (this.f7526s) { return; } this.f7511d.onLoadedAdInfo(false, "No fill"); return; } String[] split = str.split("_"); if (split.length >= 2) { this.f7527t = split[0]; String a10 = com.mobon.sdk.o.a(this.f7508a, str, split); try { WebView webView = this.f7523p; if (webView != null) { webView.onResume(); this.f7523p.loadDataWithBaseURL("https://mediacategory.com", a10, "text/html; charset=utf-8", "UTF-8", null); return; } return; } catch (Exception e10) { e10.printStackTrace(); return; } } f7.h hVar2 = this.f7524q; if (hVar2 != null ? hVar2.j() : false) { return; } this.f7509b.removeAllViews(); if (this.f7511d == null || this.f7526s) { return; } O(true); if (this.f7526s) { return; } this.f7511d.onLoadedAdInfo(false, "No fill"); } /* JADX WARN: Removed duplicated region for block: B:12:0x0099 */ /* JADX WARN: Removed duplicated region for block: B:16:0x009c */ /* JADX WARN: Removed duplicated region for block: B:9:0x008e */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ private void N(boolean r5) { /* r4 = this; android.content.Context r0 = r4.f7508a android.content.res.Resources r0 = r0.getResources() android.util.DisplayMetrics r0 = r0.getDisplayMetrics() android.view.Window r1 = r4.getWindow() if (r1 == 0) goto Lb0 android.view.Window r1 = r4.getWindow() android.view.WindowManager$LayoutParams r1 = r1.getAttributes() if (r5 == 0) goto L23 int r2 = r0.widthPixels r1.width = r2 int r0 = r0.heightPixels L20: r1.height = r0 goto L7a L23: java.lang.String r2 = r4.f7512e com.mobon.sdk.e$b r3 = com.mobon.sdk.e.b.SMALL java.lang.String r3 = r3.toString() boolean r2 = r2.equals(r3) if (r2 == 0) goto L42 android.content.Context r0 = r4.f7508a r2 = 300(0x12c, float:4.2E-43) int r0 = f7.m.a(r0, r2) r1.width = r0 android.content.Context r0 = r4.f7508a int r0 = f7.m.a(r0, r2) goto L20 L42: int r2 = r0.widthPixels float r2 = (float) r2 r3 = 1061997773(0x3f4ccccd, float:0.8) float r2 = r2 * r3 int r2 = (int) r2 r1.width = r2 int r0 = r0.heightPixels float r0 = (float) r0 float r0 = r0 * r3 int r0 = (int) r0 r1.height = r0 android.content.Context r0 = r4.f7508a r3 = 320(0x140, float:4.48E-43) int r0 = f7.m.a(r0, r3) if (r2 >= r0) goto L67 android.content.Context r0 = r4.f7508a int r0 = f7.m.a(r0, r3) r1.width = r0 L67: int r0 = r1.height android.content.Context r2 = r4.f7508a r3 = 560(0x230, float:7.85E-43) int r2 = f7.m.a(r2, r3) if (r0 >= r2) goto L7a android.content.Context r0 = r4.f7508a int r0 = f7.m.a(r0, r3) goto L20 L7a: int r0 = r1.height float r0 = (float) r0 int r2 = r1.width float r2 = (float) r2 float r0 = r0 / r2 r4.f7515h = r0 android.content.Context r0 = r4.f7508a float r0 = f7.l.b(r0) r2 = 0 int r2 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1)) if (r2 >= 0) goto L91 r0 = 1058642330(0x3f19999a, float:0.6) L91: r1.dimAmount = r0 android.view.Window r0 = r4.getWindow() if (r5 == 0) goto L9c r5 = 1024(0x400, float:1.435E-42) goto L9d L9c: r5 = 2 L9d: r0.addFlags(r5) android.view.Window r5 = r4.getWindow() r5.setAttributes(r1) android.view.Window r5 = r4.getWindow() r0 = 17 r5.setGravity(r0) Lb0: return */ throw new UnsupportedOperationException("Method not decompiled: com.mobon.sdk.b.N(boolean):void"); } /* JADX INFO: Access modifiers changed from: private */ public void O(boolean z10) { this.f7526s = z10; if (z10) { C(); } } private void R(JSONObject jSONObject) { try { if (jSONObject.getJSONArray("client").getJSONObject(0).getJSONArray(JsonStorageKeyNames.DATA_KEY).length() == 0) { if (this.f7511d == null || this.f7526s) { return; } O(true); this.f7511d.onLoadedAdInfo(false, "No fill"); return; } if (com.mobon.sdk.a.r(this.f7508a)) { super.show(); h7.d dVar = this.f7511d; if (dVar != null) { dVar.onOpened(); } setContentView(com.mobon.sdk.k.C); this.f7509b = (LinearLayout) findViewById(com.mobon.sdk.j.f7645e); RelativeLayout relativeLayout = (RelativeLayout) findViewById(com.mobon.sdk.j.f7644d); if (relativeLayout != null) { relativeLayout.bringToFront(); relativeLayout.setOnClickListener(this); if (this.f7512e.equals(e.b.FULL.toString())) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams(); int a10 = f7.m.a(this.f7508a, 14); layoutParams.setMargins(0, a10, a10, 0); relativeLayout.setLayoutParams(layoutParams); } } new Handler().postDelayed(new e(new com.mobon.sdk.n(this.f7508a, "BANNER_300x250").B0(this.f7518k), jSONObject), 10L); } } catch (Exception e10) { e10.printStackTrace(); } } /* JADX INFO: Access modifiers changed from: private */ /* JADX WARN: Removed duplicated region for block: B:110:0x0760 A[Catch: Exception -> 0x07d4, TryCatch #1 {Exception -> 0x07d4, blocks: (B:3:0x000a, B:5:0x0030, B:10:0x0038, B:12:0x005e, B:14:0x0062, B:16:0x0066, B:21:0x0075, B:23:0x0079, B:24:0x007c, B:26:0x0086, B:28:0x0092, B:31:0x009e, B:33:0x00ae, B:35:0x00b7, B:40:0x00e0, B:42:0x00f0, B:45:0x00f9, B:48:0x010c, B:49:0x011d, B:52:0x0152, B:54:0x0158, B:56:0x0168, B:58:0x0172, B:59:0x0184, B:61:0x01a7, B:63:0x01ba, B:108:0x0756, B:110:0x0760, B:112:0x0766, B:113:0x076d, B:115:0x0773, B:116:0x0795, B:118:0x079f, B:120:0x07aa, B:121:0x07b2, B:215:0x06de, B:216:0x06e1, B:219:0x06e5, B:221:0x0708, B:222:0x0733, B:223:0x0737, B:242:0x0117, B:243:0x0104, B:244:0x00cc, B:247:0x00d8, B:248:0x00b2, B:249:0x0099, B:250:0x07ce), top: B:2:0x000a }] */ /* JADX WARN: Removed duplicated region for block: B:115:0x0773 A[Catch: Exception -> 0x07d4, TryCatch #1 {Exception -> 0x07d4, blocks: (B:3:0x000a, B:5:0x0030, B:10:0x0038, B:12:0x005e, B:14:0x0062, B:16:0x0066, B:21:0x0075, B:23:0x0079, B:24:0x007c, B:26:0x0086, B:28:0x0092, B:31:0x009e, B:33:0x00ae, B:35:0x00b7, B:40:0x00e0, B:42:0x00f0, B:45:0x00f9, B:48:0x010c, B:49:0x011d, B:52:0x0152, B:54:0x0158, B:56:0x0168, B:58:0x0172, B:59:0x0184, B:61:0x01a7, B:63:0x01ba, B:108:0x0756, B:110:0x0760, B:112:0x0766, B:113:0x076d, B:115:0x0773, B:116:0x0795, B:118:0x079f, B:120:0x07aa, B:121:0x07b2, B:215:0x06de, B:216:0x06e1, B:219:0x06e5, B:221:0x0708, B:222:0x0733, B:223:0x0737, B:242:0x0117, B:243:0x0104, B:244:0x00cc, B:247:0x00d8, B:248:0x00b2, B:249:0x0099, B:250:0x07ce), top: B:2:0x000a }] */ /* JADX WARN: Removed duplicated region for block: B:118:0x079f A[Catch: Exception -> 0x07d4, TryCatch #1 {Exception -> 0x07d4, blocks: (B:3:0x000a, B:5:0x0030, B:10:0x0038, B:12:0x005e, B:14:0x0062, B:16:0x0066, B:21:0x0075, B:23:0x0079, B:24:0x007c, B:26:0x0086, B:28:0x0092, B:31:0x009e, B:33:0x00ae, B:35:0x00b7, B:40:0x00e0, B:42:0x00f0, B:45:0x00f9, B:48:0x010c, B:49:0x011d, B:52:0x0152, B:54:0x0158, B:56:0x0168, B:58:0x0172, B:59:0x0184, B:61:0x01a7, B:63:0x01ba, B:108:0x0756, B:110:0x0760, B:112:0x0766, B:113:0x076d, B:115:0x0773, B:116:0x0795, B:118:0x079f, B:120:0x07aa, B:121:0x07b2, B:215:0x06de, B:216:0x06e1, B:219:0x06e5, B:221:0x0708, B:222:0x0733, B:223:0x0737, B:242:0x0117, B:243:0x0104, B:244:0x00cc, B:247:0x00d8, B:248:0x00b2, B:249:0x0099, B:250:0x07ce), top: B:2:0x000a }] */ /* JADX WARN: Removed duplicated region for block: B:173:0x0548 */ /* JADX WARN: Removed duplicated region for block: B:205:0x06b9 A[Catch: Exception -> 0x07ca, TryCatch #0 {Exception -> 0x07ca, blocks: (B:68:0x01d9, B:174:0x054c, B:178:0x055b, B:182:0x0569, B:186:0x05ef, B:190:0x0605, B:194:0x0627, B:203:0x06af, B:205:0x06b9, B:207:0x06cb, B:209:0x06d1, B:211:0x06d7, B:224:0x0668), top: B:67:0x01d9 }] */ /* JADX WARN: Removed duplicated region for block: B:239:0x01d5 */ /* JADX WARN: Removed duplicated region for block: B:61:0x01a7 A[Catch: Exception -> 0x07d4, TryCatch #1 {Exception -> 0x07d4, blocks: (B:3:0x000a, B:5:0x0030, B:10:0x0038, B:12:0x005e, B:14:0x0062, B:16:0x0066, B:21:0x0075, B:23:0x0079, B:24:0x007c, B:26:0x0086, B:28:0x0092, B:31:0x009e, B:33:0x00ae, B:35:0x00b7, B:40:0x00e0, B:42:0x00f0, B:45:0x00f9, B:48:0x010c, B:49:0x011d, B:52:0x0152, B:54:0x0158, B:56:0x0168, B:58:0x0172, B:59:0x0184, B:61:0x01a7, B:63:0x01ba, B:108:0x0756, B:110:0x0760, B:112:0x0766, B:113:0x076d, B:115:0x0773, B:116:0x0795, B:118:0x079f, B:120:0x07aa, B:121:0x07b2, B:215:0x06de, B:216:0x06e1, B:219:0x06e5, B:221:0x0708, B:222:0x0733, B:223:0x0737, B:242:0x0117, B:243:0x0104, B:244:0x00cc, B:247:0x00d8, B:248:0x00b2, B:249:0x0099, B:250:0x07ce), top: B:2:0x000a }] */ /* JADX WARN: Removed duplicated region for block: B:71:0x01f1 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public void S(org.json.JSONObject r37, boolean r38) { /* Method dump skipped, instructions count: 2031 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: com.mobon.sdk.b.S(org.json.JSONObject, boolean):void"); } /* JADX INFO: Access modifiers changed from: private */ public void a(String str, String str2) { try { setContentView(com.mobon.sdk.k.H); this.f7509b = (LinearLayout) findViewById(com.mobon.sdk.j.f7660t); this.f7523p = (WebView) findViewById(com.mobon.sdk.j.f7666z); this.f7526s = false; RelativeLayout relativeLayout = (RelativeLayout) findViewById(com.mobon.sdk.j.f7644d); if (relativeLayout != null) { relativeLayout.setOnClickListener(this); if (this.f7512e.equals(e.b.FULL.toString())) { RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams(); int a10 = f7.m.a(this.f7508a, 14); layoutParams.setMargins(0, a10, a10, 0); relativeLayout.setLayoutParams(layoutParams); } } CookieManager cookieManager = CookieManager.getInstance(); cookieManager.setAcceptCookie(true); if (!this.f7529v) { cookieManager.setCookie("https://mediacategory.com", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } this.f7529v = true; new Handler(Looper.getMainLooper()).post(new g(str, str2, cookieManager)); } catch (Exception e10) { e10.printStackTrace(); f7.f.b("ERROR", "error => " + e10.toString()); f7.h hVar = this.f7524q; if ((hVar != null ? hVar.j() : false) || this.f7511d == null || this.f7526s) { return; } O(true); if (this.f7526s) { return; } this.f7511d.onLoadedAdInfo(false, "No fill"); } } public b B() { E(); return this; } public void C() { Context context; if (isShowing() && (context = this.f7508a) != null && (context instanceof Activity)) { try { if (((Activity) context).isFinishing()) { return; } dismiss(); } catch (Exception e10) { e10.printStackTrace(); } } } protected void E() { if (com.mobon.sdk.f.c(this.f7508a) == null) { new Handler().postDelayed(new i(), 1000L); } else { f7.l.i(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); N(this.f7517j); } } public boolean F() { f7.b bVar; return this.f7513f || !TextUtils.isEmpty(f7.l.e(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA")) || ((bVar = this.f7521n) != null && bVar.n()); } public void G() { Handler handler; Runnable kVar; long incrementAndGet; if (f7.l.a(this.f7508a, "Key.AGE_LEVEL_KIDS")) { h7.d dVar = this.f7511d; if (dVar != null) { dVar.onLoadedAdInfo(false, "No fill"); return; } return; } O(false); this.f7525r = false; if (this.f7516i.get() > 5) { this.f7516i.getAndSet(0); h7.d dVar2 = this.f7511d; if (dVar2 != null) { dVar2.onLoadedAdInfo(false, "Empty UnitId"); O(true); return; } return; } if (TextUtils.isEmpty(this.f7518k)) { handler = new Handler(); kVar = new k(); incrementAndGet = this.f7516i.incrementAndGet() * 300; } else { handler = new Handler(); kVar = new j(); incrementAndGet = 10; } handler.postDelayed(kVar, incrementAndGet); } protected void H(boolean z10) { this.f7513f = false; if (System.currentTimeMillis() > f7.l.d(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA_TIME") + 360000) { f7.l.i(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } String e10 = f7.l.e(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA"); if (!TextUtils.isEmpty(e10)) { if (!z10) { new Handler(Looper.getMainLooper()).post(new l(e10)); return; } if (this.f7511d != null && !this.f7525r) { f7.f.a("Interstitial loadAd onLoadedAdInfo"); this.f7525r = true; this.f7511d.onLoadedAdInfo(true, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } dismiss(); return; } if (!f7.m.d(this.f7508a)) { if (this.f7511d == null || this.f7526s) { dismiss(); if (!z10) { ((Activity) this.f7508a).finish(); } } else { f7.f.a("Interstitial loadAd noConnectNetwork"); this.f7511d.onLoadedAdInfo(false, "noConnectNetwork"); O(true); } } Map k10 = com.mobon.sdk.a.k(this.f7508a); k10.put("s", this.f7518k); com.mobon.sdk.a.n(this.f7508a, this.f7518k, k10, false, this.f7520m, false, new m(z10)); } public void I() { J(RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED); } public void M(h7.d dVar) { this.f7511d = dVar; } public b P(e.b bVar) { if (bVar == e.b.FULL) { this.f7517j = true; } else if (bVar == e.b.SHORTCUT) { f7.l.i(this.f7508a, "Key.INTERSTITIAL_POPUP_TYPE", bVar.toString()); } this.f7512e = bVar.toString(); return this; } public b Q(String str) { this.f7518k = str; return this; } @Override // android.app.Dialog, android.content.DialogInterface public void dismiss() { WebView webView = this.f7523p; if (webView != null) { webView.onPause(); this.f7523p = null; } super.dismiss(); } @Override // android.app.Dialog, android.view.Window.Callback public void onAttachedToWindow() { super.onAttachedToWindow(); } @Override // android.app.Dialog public void onBackPressed() { try { if (this.f7528u) { if (isShowing()) { dismiss(); } h7.d dVar = this.f7511d; if (dVar != null) { dVar.onClosed(); } } } catch (Exception e10) { e10.printStackTrace(); } } @Override // android.view.View.OnClickListener public void onClick(View view) { if (view.getId() == com.mobon.sdk.j.f7644d) { h7.d dVar = this.f7511d; if (dVar != null) { dVar.onClickEvent(e.a.CLOSE); this.f7511d.onClosed(); } LinearLayout linearLayout = this.f7509b; if (linearLayout != null) { linearLayout.removeAllViews(); } RelativeLayout relativeLayout = this.f7510c; if (relativeLayout != null) { relativeLayout.removeAllViews(); } dismiss(); } } @Override // android.app.Dialog, android.view.Window.Callback public void onDetachedFromWindow() { super.onDetachedFromWindow(); } @Override // android.app.Dialog public void show() { f7.f.a("Intersitial show"); f7.b bVar = this.f7521n; if (bVar != null && bVar.n()) { new Handler().postDelayed(new n(), 10L); h7.d dVar = this.f7511d; if (dVar != null) { dVar.onOpened(); return; } return; } String e10 = f7.l.e(this.f7508a, "Key.INTERSTITIAL_CACHE_DATA"); if (!TextUtils.isEmpty(e10)) { new Handler(Looper.getMainLooper()).post(new o(e10)); return; } f7.f.a("Intersitial cashData Null"); if (this.f7511d == null || this.f7526s) { return; } f7.f.a("Interstitial onLoadedAdInfo Empty Ad data.. please load() first"); O(true); this.f7511d.onLoadedAdInfo(false, "Empty Ad data.. please load() first"); } }