package com.mbridge.msdk.video.bt.module; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.os.Handler; import android.text.TextUtils; import android.util.AttributeSet; import android.util.Base64; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; import android.widget.RelativeLayout; import androidx.core.app.NotificationCompat; import com.iab.omid.library.mmadbridge.adsession.AdEvents; import com.iab.omid.library.mmadbridge.adsession.AdSession; import com.iab.omid.library.mmadbridge.adsession.FriendlyObstructionPurpose; import com.iab.omid.library.mmadbridge.adsession.media.InteractionType; import com.iab.omid.library.mmadbridge.adsession.media.MediaEvents; import com.iab.omid.library.mmadbridge.adsession.media.Position; import com.iab.omid.library.mmadbridge.adsession.media.VastProperties; import com.mbridge.msdk.MBridgeConstans; import com.mbridge.msdk.foundation.entity.CampaignEx; import com.mbridge.msdk.foundation.entity.n; import com.mbridge.msdk.foundation.tools.ab; import com.mbridge.msdk.foundation.tools.af; import com.mbridge.msdk.foundation.tools.ah; import com.mbridge.msdk.foundation.tools.ak; import com.mbridge.msdk.foundation.tools.s; import com.mbridge.msdk.foundation.tools.x; import com.mbridge.msdk.mbsignalcommon.mraid.d; import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView; import com.mbridge.msdk.mbsignalcommon.windvane.g; import com.mbridge.msdk.out.Campaign; import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode; import com.mbridge.msdk.scheme.applet.AppletModelManager; import com.mbridge.msdk.scheme.applet.AppletSchemeCallBack; import com.mbridge.msdk.scheme.applet.AppletsModel; import com.mbridge.msdk.video.bt.module.b.h; import com.mbridge.msdk.video.module.MBridgeContainerView; import com.mbridge.msdk.video.module.MBridgeVideoView; import com.mbridge.msdk.video.module.a.a.m; import com.mbridge.msdk.video.signal.a.a; import com.mbridge.msdk.video.signal.a.k; import com.mbridge.msdk.video.signal.container.AbstractJSContainer; import com.mbridge.msdk.videocommon.a; import java.util.ArrayList; import java.util.List; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes4.dex */ public class MBTempContainer extends MBTempContainerDiff { private static final String x = "MBTempContainer"; private com.mbridge.msdk.videocommon.download.a A; private h B; private com.mbridge.msdk.video.bt.module.a.b C; private com.mbridge.msdk.video.dynview.e.a D; private int E; private String F; private com.mbridge.msdk.video.signal.factory.b G; private int H; private int I; private boolean J; private int K; private int L; private int M; private int N; private int O; private String P; private String Q; private List R; private int S; private com.mbridge.msdk.foundation.same.report.d.c T; private LayoutInflater U; private int V; private int W; protected boolean a; private View aa; private boolean ab; private boolean ac; private boolean ad; private boolean ae; private boolean af; private boolean ag; private boolean ah; private boolean ai; private boolean aj; private boolean ak; private com.mbridge.msdk.mbsignalcommon.mraid.d al; private AdSession am; private MediaEvents an; private AdEvents ao; private Runnable ap; private boolean aq; protected boolean b; protected a c; protected WindVaneWebView d; protected MBridgeContainerView e; protected Handler f; protected Runnable g; protected Runnable h; private View y; private CampaignEx z; public AdEvents getAdEvents() { return this.ao; } public AdSession getAdSession() { return this.am; } public CampaignEx getCampaign() { return this.z; } public String getInstanceId() { return this.F; } public MediaEvents getVideoEvents() { return this.an; } public boolean isLoadSuccess() { return this.b; } public void preload() { } public void registerErrorListener(a aVar) { this.c = aVar; } public void setCamPlayOrderCallback(com.mbridge.msdk.video.dynview.e.a aVar, int i) { this.D = aVar; this.E = i; } public void setCampOrderViewData(List list, int i) { if (list != null) { this.R = list; } this.S = i; } public void setCampaignDownLoadTask(com.mbridge.msdk.videocommon.download.a aVar) { this.A = aVar; } public void setDeveloperExtraData(String str) { this.Q = str; } public void setInstanceId(String str) { this.F = str; } public void setJSFactory(com.mbridge.msdk.video.signal.factory.b bVar) { this.G = bVar; } public void setMBridgeTempCallback(com.mbridge.msdk.video.bt.module.a.b bVar) { this.C = bVar; } public void setMediaPlayerUrl(String str) { } public void setShowRewardListener(h hVar) { this.B = hVar; } public void setWebViewFront(int i) { this.W = i; } public MBTempContainer(Context context) { super(context); this.E = 1; this.F = ""; this.H = com.mbridge.msdk.foundation.same.a.F; this.J = false; this.P = ""; this.R = new ArrayList(); this.S = 0; this.a = false; this.b = false; this.c = new a.C0237a(); this.f = new Handler(); this.V = 0; this.W = 0; this.g = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.1 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.getActivityProxy().h() != 0) { MBTempContainer.this.V = -3; } else { MBTempContainer.this.defaultLoad(-1, "WebView load timeout"); } } }; this.h = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.3 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.getActivityProxy().h() != 0) { MBTempContainer.this.V = -4; } else { MBTempContainer.this.defaultLoad(-3, "Signal Communication connect timeout"); } } }; this.ab = false; this.ac = false; this.ad = false; this.af = false; this.ag = false; this.ah = false; this.ai = false; this.aj = false; this.ak = false; this.am = null; this.an = null; this.ao = null; this.ap = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.6 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.aa != null) { MBTempContainer.this.aa.setVisibility(8); } } }; this.aq = false; init(context); } public MBTempContainer(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.E = 1; this.F = ""; this.H = com.mbridge.msdk.foundation.same.a.F; this.J = false; this.P = ""; this.R = new ArrayList(); this.S = 0; this.a = false; this.b = false; this.c = new a.C0237a(); this.f = new Handler(); this.V = 0; this.W = 0; this.g = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.1 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.getActivityProxy().h() != 0) { MBTempContainer.this.V = -3; } else { MBTempContainer.this.defaultLoad(-1, "WebView load timeout"); } } }; this.h = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.3 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.getActivityProxy().h() != 0) { MBTempContainer.this.V = -4; } else { MBTempContainer.this.defaultLoad(-3, "Signal Communication connect timeout"); } } }; this.ab = false; this.ac = false; this.ad = false; this.af = false; this.ag = false; this.ah = false; this.ai = false; this.aj = false; this.ak = false; this.am = null; this.an = null; this.ao = null; this.ap = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.6 @Override // java.lang.Runnable public final void run() { if (MBTempContainer.this.aa != null) { MBTempContainer.this.aa.setVisibility(8); } } }; this.aq = false; init(context); } public void init(Context context) { this.U = LayoutInflater.from(context); } public void setMatchParent() { ViewGroup.LayoutParams layoutParams = getLayoutParams(); if (layoutParams == null) { setLayoutParams(new ViewGroup.LayoutParams(-1, -1)); } else { layoutParams.height = -1; layoutParams.width = -1; } } public int findID(String str) { return x.a(getContext(), str, "id"); } public int findLayout(String str) { return x.a(getContext(), str, TtmlNode.TAG_LAYOUT); } public interface a { void a(String str); void a(boolean z); /* renamed from: com.mbridge.msdk.video.bt.module.MBTempContainer$a$a, reason: collision with other inner class name */ public static class C0237a implements a { private boolean a = false; @Override // com.mbridge.msdk.video.bt.module.MBTempContainer.a public final void a(boolean z) { this.a = z; } @Override // com.mbridge.msdk.video.bt.module.MBTempContainer.a public void a(String str) { af.b("ActivityErrorListener", str); this.a = true; } } } private int c() { k b2 = b(this.z); if (b2 != null) { return b2.m(); } return 0; } private boolean d() { k b2 = b(this.z); if (b2 != null) { return b2.p(); } return false; } private boolean e() { if (this.mbridgeVideoView != null) { return com.mbridge.msdk.e.b.a() ? this.mbridgeVideoView.isShowingAlertView() || checkChinaShowingAlertViewState() || this.mbridgeVideoView.isRewardPopViewShowing() : this.mbridgeVideoView.isShowingAlertView() || this.mbridgeVideoView.isRewardPopViewShowing(); } return false; } public void superDefaultLoad(int i, String str) { this.f.removeCallbacks(this.g); this.f.removeCallbacks(this.h); this.c.a(true); WindVaneWebView windVaneWebView = this.d; if (windVaneWebView != null) { windVaneWebView.setVisibility(8); } } public void setAdEvents(AdEvents adEvents) { this.ao = adEvents; com.mbridge.msdk.video.signal.factory.b bVar = this.G; if (bVar == null || bVar.getJSCommon() == null) { return; } this.G.getJSCommon().a(adEvents); } public void setAdSession(AdSession adSession) { this.am = adSession; com.mbridge.msdk.video.signal.factory.b bVar = this.G; if (bVar != null && bVar.getJSCommon() != null) { this.G.getJSCommon().a(adSession); } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.setAdSession(adSession); } } public void setVideoEvents(MediaEvents mediaEvents) { this.an = mediaEvents; com.mbridge.msdk.video.signal.factory.b bVar = this.G; if (bVar != null && bVar.getJSCommon() != null) { this.G.getJSCommon().a(mediaEvents); } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.setVideoEvents(mediaEvents); } } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer, android.view.View public void onConfigurationChanged(Configuration configuration) { super.onConfigurationChanged(configuration); } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer public final void a(String str) { h hVar = this.B; if (hVar != null) { hVar.a(this.T, str); } super.a(str); } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer public void onPause() { super.onPause(); this.ad = true; try { getJSVideoModule().videoOperate(2); MBridgeContainerView mBridgeContainerView = this.e; if (mBridgeContainerView != null) { mBridgeContainerView.setOnPause(); } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.onActivityPause(); } } catch (Throwable th) { af.b(x, th.getMessage(), th); } } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer public void onResume() { Activity activity; super.onResume(); int i = this.V; Runnable runnable = i == -3 ? this.g : i == -4 ? this.h : null; if (runnable != null) { runnable.run(); this.V = 0; } try { if (this.mbridgeVideoView != null && !e() && !this.mbridgeVideoView.isMiniCardShowing() && !com.mbridge.msdk.foundation.d.b.c) { this.mbridgeVideoView.setCover(false); } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.onActivityResume(); } MBridgeContainerView mBridgeContainerView = this.e; if (mBridgeContainerView != null) { mBridgeContainerView.setOnResume(); } if (this.ad && !e() && !com.mbridge.msdk.foundation.d.b.c) { getJSVideoModule().videoOperate(1); } Activity activity2 = this.i; if (activity2 != null) { ak.a(activity2.getWindow().getDecorView()); } if (this.af && this.ag && (activity = this.i) != null) { activity.finish(); } } catch (Throwable th) { af.b(x, th.getMessage(), th); } } @Override // android.view.ViewGroup, android.view.View public void onDetachedFromWindow() { super.onDetachedFromWindow(); } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer public void onStop() { super.onStop(); MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.setCover(true); this.mbridgeVideoView.onActivityStop(); } } @Override // com.mbridge.msdk.video.signal.container.AbstractJSContainer public void onDestroy() { CampaignEx campaignEx; int i; if (this.J) { return; } boolean z = true; this.J = true; super.onDestroy(); try { if (com.mbridge.msdk.e.b.a()) { setChinaDestroy(); } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.releasePlayer(); } WindVaneWebView windVaneWebView = this.d; if (windVaneWebView != null) { ViewGroup viewGroup = (ViewGroup) windVaneWebView.getParent(); if (viewGroup != null) { viewGroup.removeAllViews(); } this.d.clearWebView(); this.d.release(); } if (this.C != null) { this.C = null; } this.f.removeCallbacks(this.g); this.f.removeCallbacks(this.h); getJSCommon().e(); if (this.q) { com.mbridge.msdk.c.h.a().e(this.j); } if (!this.ab) { try { this.ab = true; CampaignEx campaignEx2 = this.z; if (campaignEx2 != null && campaignEx2.getPlayable_ads_without_video() == 2) { this.ac = true; } MediaEvents mediaEvents = this.an; if (mediaEvents != null && !this.ac) { try { mediaEvents.skipped(); } catch (Exception e2) { af.a("omsdk", e2.getMessage()); } } h hVar = this.B; if (hVar != null) { if (this.q && ((i = this.s) == com.mbridge.msdk.foundation.same.a.H || i == com.mbridge.msdk.foundation.same.a.I)) { if (this.I != 1) { z = false; } hVar.a(z, this.H); } if (!this.ac) { this.n.a(0); } this.T.a(this.z); this.B.a(this.T, this.ac, this.n); } this.f.removeCallbacks(this.ap); if (((!this.q && !this.v) || ((campaignEx = this.z) != null && campaignEx.isDynamicView())) && this.ac && (!com.mbridge.msdk.e.b.a() || !checkChinaSendToServerDiff(this.B))) { af.a(x, "sendToServerRewardInfo"); com.mbridge.msdk.video.module.b.b.a(this.z, this.n, this.j, this.m, this.Q); } if (!this.v) { if (this.q) { com.mbridge.msdk.videocommon.a.b(287, this.z); } else { com.mbridge.msdk.videocommon.a.b(94, this.z); } } MBridgeContainerView mBridgeContainerView = this.e; if (mBridgeContainerView != null) { mBridgeContainerView.release(); } } catch (Throwable th) { af.b(x, th.getMessage(), th); } } if (!this.ae) { f(); } com.mbridge.msdk.mbsignalcommon.mraid.d dVar = this.al; if (dVar != null) { dVar.d(); } if (this.am != null) { af.b("omsdk", "tc onDestroy"); this.am.removeAllFriendlyObstructions(); this.am.finish(); this.am = null; } if (!this.v) { if (isLoadSuccess()) { this.f.postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.7 @Override // java.lang.Runnable public final void run() { if (((AbstractJSContainer) MBTempContainer.this).i != null) { ((AbstractJSContainer) MBTempContainer.this).i.finish(); } } }, 100L); } else { Activity activity = this.i; if (activity != null) { activity.finish(); } } } if (!this.ae) { f(); } com.mbridge.msdk.video.bt.a.d.c().f(this.F); } catch (Throwable th2) { af.a(x, th2.getMessage()); } } private void f() { com.mbridge.msdk.foundation.same.report.h hVar = new com.mbridge.msdk.foundation.same.report.h(getContext()); CampaignEx campaignEx = this.z; if (campaignEx != null) { hVar.b(campaignEx.getRequestId(), this.z.getRequestIdNotice(), this.z.getId(), this.j, com.mbridge.msdk.mbsignalcommon.mraid.c.a(this.z.getId()), this.z.isBidCampaign()); com.mbridge.msdk.mbsignalcommon.mraid.c.b(this.z.getId()); this.ae = true; } } public void setShowingTransparent() { int a2; Activity activity; boolean d2 = d(); this.af = d2; if (d2 || (a2 = x.a(getContext(), "mbridge_reward_theme", "style")) <= 1 || (activity = this.i) == null) { return; } activity.setTheme(a2); } private void g() { AdSession adSession = this.am; if (adSession != null) { try { MBridgeContainerView mBridgeContainerView = this.e; FriendlyObstructionPurpose friendlyObstructionPurpose = FriendlyObstructionPurpose.OTHER; adSession.addFriendlyObstruction(mBridgeContainerView, friendlyObstructionPurpose, null); View view = this.aa; if (view != null) { this.am.addFriendlyObstruction(view, friendlyObstructionPurpose, null); } WindVaneWebView windVaneWebView = this.d; if (windVaneWebView != null) { this.am.addFriendlyObstruction(windVaneWebView, friendlyObstructionPurpose, null); } this.mbridgeVideoView.setVideoEvents(this.an); this.am.start(); if (this.ao != null) { VastProperties createVastPropertiesForNonSkippableMedia = VastProperties.createVastPropertiesForNonSkippableMedia(true, Position.STANDALONE); af.a("omsdk", "bt: adEvents.loaded"); this.ao.loaded(createVastPropertiesForNonSkippableMedia); this.ao.impressionOccurred(); } } catch (Exception e2) { af.a("omsdk", e2.getMessage()); } } } public void receiveSuccess() { af.a(x, "receiveSuccess ,start hybrid"); this.f.removeCallbacks(this.h); this.f.postDelayed(this.ap, 250L); } public void defaultLoad(int i, String str) { int e2; int i2; superDefaultLoad(i, str); CampaignEx campaignEx = this.z; if (campaignEx != null && !campaignEx.isDynamicView()) { this.z.setTemplateRenderSucc(false); } if (isLoadSuccess()) { if (this.z.getPlayable_ads_without_video() == 2) { this.e.setCampaign(this.z); this.e.addOrderViewData(this.R); this.e.setUnitID(this.j); this.e.setCloseDelayTime(i()); this.e.setPlayCloseBtnTm(this.l.h()); this.e.setNotifyListener(new com.mbridge.msdk.video.module.a.a.h(this.z, this.A, this.n, b(), this.j, new d(), this.l.y(), this.v)); this.e.preLoadData(this.G); this.e.showPlayableView(); } else { a(i, str); this.aa.setVisibility(8); loadModuleDatas(); int f2 = this.l.f(); int c2 = c(); int i3 = c2 != 0 ? c2 : f2; CampaignEx campaignEx2 = this.z; if (campaignEx2 != null && campaignEx2.isDynamicView()) { this.mbridgeVideoView.setContainerViewOnNotifyListener(new c(this.i, this.z)); } CampaignEx campaignEx3 = this.z; if (campaignEx3 != null && campaignEx3.getVst() > -2) { e2 = this.z.getVst(); } else { e2 = this.l.e(); } CampaignEx campaignEx4 = this.z; if (campaignEx4 != null && campaignEx4.getDynamicTempCode() == 5 && (i2 = this.E) > 1) { e2 = a(e2, i2); this.z.setVst(e2); } int i4 = e2; this.mbridgeVideoView.setVideoSkipTime(i4); MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; mBridgeVideoView.setNotifyListener(new m(mBridgeVideoView, this.e, this.z, this.n, this.A, b(), this.j, i3, i4, new f(), this.l.y(), this.v, this.l.C())); this.mbridgeVideoView.setAdSession(this.am); this.mbridgeVideoView.setVideoEvents(this.an); this.mbridgeVideoView.defaultShow(); MBridgeContainerView mBridgeContainerView = this.e; mBridgeContainerView.setNotifyListener(new com.mbridge.msdk.video.module.a.a.b(this.mbridgeVideoView, mBridgeContainerView, this.z, this.n, this.A, b(), this.j, new c(this.i, this.z), this.l.y(), this.v)); this.e.defaultShow(); } g(); return; } a(i, str); Activity activity = this.i; if (activity != null) { activity.finish(); } } public int getLayoutID() { return findLayout(this.af ? "mbridge_reward_activity_video_templete_transparent" : "mbridge_reward_activity_video_templete"); } public WindVaneWebView findWindVaneWebView() { a.C0246a a2; try { if (this.v) { CampaignEx campaignEx = this.z; if (campaignEx == null || campaignEx.getRewardTemplateMode() == null) { return null; } a.C0246a a3 = com.mbridge.msdk.videocommon.a.a(this.j + "_" + this.z.getId() + "_" + this.z.getRequestId() + "_" + this.z.getRewardTemplateMode().e()); if (a3 != null) { return a3.a(); } return null; } if (this.q) { a2 = com.mbridge.msdk.videocommon.a.a(287, this.z); } else { a2 = com.mbridge.msdk.videocommon.a.a(94, this.z); } if (a2 == null || !a2.c()) { return null; } if (this.q) { com.mbridge.msdk.videocommon.a.b(287, this.z); } else { com.mbridge.msdk.videocommon.a.b(94, this.z); } WindVaneWebView a4 = a2.a(); if (this.af) { a4.setWebViewTransparent(); } return a4; } catch (Exception e2) { if (!MBridgeConstans.DEBUG) { return null; } e2.printStackTrace(); return null; } } public MBridgeVideoView findMBridgeVideoView() { return (MBridgeVideoView) findViewById(findID("mbridge_video_templete_videoview")); } public MBridgeContainerView findMBridgeContainerView() { return (MBridgeContainerView) findViewById(findID("mbridge_video_templete_container")); } public boolean initViews() { View findViewById = findViewById(findID("mbridge_video_templete_progressbar")); this.aa = findViewById; return findViewById != null; } public boolean canBackPress() { MBridgeContainerView mBridgeContainerView = this.e; return mBridgeContainerView == null || mBridgeContainerView.canBackPress(); } public void onBackPressed() { MBridgeContainerView mBridgeContainerView; MBridgeContainerView mBridgeContainerView2; MBridgeVideoView mBridgeVideoView; MBridgeVideoView mBridgeVideoView2; if (this.af && (mBridgeVideoView2 = this.mbridgeVideoView) != null) { mBridgeVideoView2.notifyVideoClose(); return; } CampaignEx campaignEx = this.z; if (((campaignEx != null && campaignEx.getRewardTemplateMode() != null && this.z.getRewardTemplateMode().f() == 5002010) || this.ah) && (mBridgeVideoView = this.mbridgeVideoView) != null) { if (!mBridgeVideoView.isMiniCardShowing()) { this.mbridgeVideoView.onBackPress(); return; } MBridgeContainerView mBridgeContainerView3 = this.e; if (mBridgeContainerView3 != null) { mBridgeContainerView3.onMiniEndcardBackPress(); return; } return; } if (this.aj && (mBridgeContainerView2 = this.e) != null) { mBridgeContainerView2.onPlayableBackPress(); return; } if (this.ai && (mBridgeContainerView = this.e) != null) { mBridgeContainerView.onEndcardBackPress(); } if (getJSCommon().b()) { if (getJSContainerModule() == null || !getJSContainerModule().miniCardShowing()) { getActivityProxy().g(); return; } return; } if (!canBackPress()) { af.a(x, "onBackPressed can't excute"); return; } Activity activity = this.i; if (activity == null || this.v || this.ak) { return; } this.ak = true; activity.onBackPressed(); } private void a(int i, String str) { try { n nVar = new n(); nVar.a("2000037"); nVar.r("code=" + i + ",desc=" + str); CampaignEx campaignEx = this.z; nVar.q((campaignEx == null || campaignEx.getRewardTemplateMode() == null) ? "" : this.z.getRewardTemplateMode().e()); nVar.c(this.j); CampaignEx campaignEx2 = this.z; nVar.e(campaignEx2 != null ? campaignEx2.getId() : ""); CampaignEx campaignEx3 = this.z; if (campaignEx3 != null && !TextUtils.isEmpty(campaignEx3.getRequestId())) { nVar.f(this.z.getRequestId()); } CampaignEx campaignEx4 = this.z; if (campaignEx4 != null && !TextUtils.isEmpty(campaignEx4.getRequestIdNotice())) { nVar.g(this.z.getRequestIdNotice()); } int m = ab.m(getContext()); nVar.a(m); nVar.k(ab.a(getContext(), m)); com.mbridge.msdk.foundation.same.report.n.b(nVar); } catch (Throwable th) { af.b(x, th.getMessage(), th); } } private int h() { try { com.mbridge.msdk.videocommon.d.a b2 = com.mbridge.msdk.videocommon.d.b.a().b(); if (b2 == null) { com.mbridge.msdk.videocommon.d.b.a().c(); } if (b2 != null) { return (int) b2.h(); } return 5; } catch (Throwable th) { th.printStackTrace(); return 5; } } private int i() { CampaignEx campaignEx = this.z; if (campaignEx == null) { return 1; } boolean a2 = ak.a(MBridgeConstans.DYNAMIC_VIEW_KEY_CLOSE_BTN_DELATE, campaignEx.getendcard_url()); int c2 = ak.c(this.z.getendcard_url(), MBridgeConstans.DYNAMIC_VIEW_KEY_CLOSE_BTN_DELATE); if (a2 && c2 >= 0) { return c2; } if (this.z.getCbd() > -2) { return this.z.getCbd(); } return this.l.p(); } private int a(int i, int i2) { List list; if (i < 0 || (list = this.R) == null || list.size() == 0 || i2 <= 1) { return i; } int i3 = 0; for (int i4 = 0; i4 < i2 - 1; i4++) { if (this.R.get(i4) != null) { i3 += this.R.get(i4).getVideoLength(); } } if (i > i3) { return i - i3; } return 0; } public final class f extends com.mbridge.msdk.video.module.a.a.f { private f() { } /* JADX WARN: Code restructure failed: missing block: B:21:0x0090, code lost: if (r6.a.z.isCampaignIsFiltered() != false) goto L34; */ /* JADX WARN: Code restructure failed: missing block: B:64:0x01a5, code lost: if (r6.a.z.isCampaignIsFiltered() != false) goto L69; */ @Override // com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void a(int r7, java.lang.Object r8) { /* Method dump skipped, instructions count: 520 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBTempContainer.f.a(int, java.lang.Object):void"); } } public final class c extends com.mbridge.msdk.video.module.a.a.a { public c(Activity activity, CampaignEx campaignEx) { super(activity, campaignEx); } @Override // com.mbridge.msdk.video.module.a.a.a, com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a public final void a(int i, Object obj) { if (com.mbridge.msdk.e.b.a()) { MBTempContainer.this.setChinaJsCommonContext(); } if (i != 108) { if (i != 113) { if (i == 117) { MBridgeVideoView mBridgeVideoView = MBTempContainer.this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.setVisible(4); } MBTempContainer.this.ai = true; MBTempContainer.this.B.b(((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); } else if (i == 126 || i == 128) { MBTempContainer.this.B.a(false, ((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); } else if (i == 131) { MBTempContainer.this.B.a(true, ((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); } else { switch (i) { case 103: case 104: MBTempContainer.r(MBTempContainer.this); break; case 105: if (com.mbridge.msdk.e.b.a()) { MBTempContainer.this.setChinaCTACallBack(); } MBTempContainer.this.getJSCommon().click(1, obj != null ? obj.toString() : ""); break; case 106: if (com.mbridge.msdk.e.b.a()) { MBTempContainer mBTempContainer = MBTempContainer.this; mBTempContainer.setChinaBrowserCallBack(mBTempContainer.C, MBTempContainer.this.F, MBTempContainer.this.B, MBTempContainer.this.z); if (((AbstractJSContainer) MBTempContainer.this).i != null && MBTempContainer.this.z != null) { MBTempContainer.r(MBTempContainer.this); break; } } break; } } } MBTempContainer.this.B.a(true, ((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); } else { if (com.mbridge.msdk.e.b.a()) { MBTempContainer mBTempContainer2 = MBTempContainer.this; mBTempContainer2.setChinaCallBackStatus(mBTempContainer2.d); } MBTempContainer.this.getJSCommon().a(new a.b(MBTempContainer.this.getJSCommon(), new e())); MBTempContainer.this.getJSCommon().click(1, obj != null ? obj.toString() : ""); } super.a(i, obj); } } public final class d extends com.mbridge.msdk.video.module.a.a.f { private d() { } @Override // com.mbridge.msdk.video.module.a.a.f, com.mbridge.msdk.video.module.a.a public final void a(int i, Object obj) { String str; super.a(i, obj); try { if (obj instanceof JSONObject) { str = obj.toString(); } else { str = (String) obj; } if (((AbstractJSContainer) MBTempContainer.this).q && !TextUtils.isEmpty(str)) { JSONObject jSONObject = new JSONObject(str); int optInt = jSONObject.optInt("type"); int optInt2 = jSONObject.optInt(CampaignEx.JSON_NATIVE_VIDEO_COMPLETE); if (optInt == 2) { MBTempContainer.this.H = com.mbridge.msdk.foundation.same.a.D; } else if (optInt != 3) { MBTempContainer.this.H = com.mbridge.msdk.foundation.same.a.F; } else { MBTempContainer.this.H = com.mbridge.msdk.foundation.same.a.E; } MBTempContainer.this.I = optInt2; } } catch (Exception unused) { af.b("NotifyListener", "PlayableResultListener ERROR"); } if (i == 120) { MBTempContainer.this.B.b(((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); return; } if (i == 131) { MBTempContainer.this.getJSCommon().click(4, obj != null ? obj.toString() : ""); return; } if (i == 126) { MBTempContainer.this.B.a(false, ((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); return; } if (i != 127) { switch (i) { case 100: MBTempContainer.this.aj = true; MBTempContainer mBTempContainer = MBTempContainer.this; mBTempContainer.f.postDelayed(mBTempContainer.ap, 250L); MBTempContainer.this.B.a(MBTempContainer.this.T); break; case 101: case 102: MBTempContainer.this.getJSCommon().d(); break; case 103: MBTempContainer.this.ac = true; if (MBTempContainer.this.z.isMraid()) { MBTempContainer.r(MBTempContainer.this); break; } else { MBTempContainer.this.getJSCommon().d(); break; } case 104: MBTempContainer.r(MBTempContainer.this); break; case 105: if (com.mbridge.msdk.e.b.a()) { MBTempContainer.this.setChinaCTACallBack(); } MBTempContainer.this.getJSCommon().click(1, obj != null ? obj.toString() : ""); break; } return; } MBTempContainer.this.ac = true; MBTempContainer.this.B.a(MBTempContainer.this.T); MBTempContainer.this.B.b(((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); MBTempContainer.this.getJSContainerModule().showEndcard(100); } } public class e extends a.C0245a { private e() { } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.video.signal.a.InterfaceC0244a public final void a() { super.a(); MBTempContainer.this.receiveSuccess(); } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.out.BaseTrackingListener public final void onStartRedirection(Campaign campaign, String str) { super.onStartRedirection(campaign, str); MBTempContainer.P(MBTempContainer.this); if (MBTempContainer.this.aq) { MBTempContainer.this.onPause(); } } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.out.BaseTrackingListener public final void onFinishRedirection(Campaign campaign, String str) { super.onFinishRedirection(campaign, str); MBTempContainer.this.ag = true; MBTempContainer.R(MBTempContainer.this); if (campaign != null && (campaign instanceof CampaignEx)) { try { CampaignEx campaignEx = (CampaignEx) campaign; String optString = new JSONObject(MBTempContainer.this.getJSVideoModule().getCurrentProgress()).optString(NotificationCompat.CATEGORY_PROGRESS, ""); if (campaignEx.getLinkType() == 3 && campaignEx.getEndcard_click_result() == 2 && optString.equals("1.0") && ((AbstractJSContainer) MBTempContainer.this).i != null) { if (!((AbstractJSContainer) MBTempContainer.this).v) { ((AbstractJSContainer) MBTempContainer.this).i.finish(); } else { MBTempContainer.r(MBTempContainer.this); } } } catch (JSONException e) { e.printStackTrace(); } } if (MBTempContainer.this.aq) { MBTempContainer.this.onResume(); } } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.out.BaseTrackingListener public final void onRedirectionFailed(Campaign campaign, String str) { super.onRedirectionFailed(campaign, str); MBTempContainer.R(MBTempContainer.this); MBTempContainer.this.ag = true; } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.video.signal.a.InterfaceC0244a public final void a(boolean z) { if (MBTempContainer.this.an != null) { try { MBTempContainer.this.an.adUserInteraction(InteractionType.CLICK); af.a("omsdk", "mbtc adUserInteraction click"); } catch (Exception e) { af.b("omsdk", e.getMessage()); } } super.a(z); MBTempContainer.this.B.a(z, ((AbstractJSContainer) MBTempContainer.this).k, ((AbstractJSContainer) MBTempContainer.this).j); } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.video.signal.a.InterfaceC0244a public final void a(int i, String str) { super.a(i, str); MBTempContainer.this.defaultLoad(i, str); } @Override // com.mbridge.msdk.video.signal.a.a.C0245a, com.mbridge.msdk.video.signal.a.InterfaceC0244a public final void b() { super.b(); MBTempContainer mBTempContainer = MBTempContainer.this; Handler handler = mBTempContainer.f; if (handler != null) { handler.removeCallbacks(mBTempContainer.g); } } } public void setCampaign(CampaignEx campaignEx) { this.z = campaignEx; if (campaignEx != null) { com.mbridge.msdk.foundation.same.report.d.c a2 = com.mbridge.msdk.foundation.same.report.d.d.a().a(campaignEx.getCurrentLocalRid(), ""); this.T = a2; if (a2 == null) { this.T = new com.mbridge.msdk.foundation.same.report.d.c(); } this.T.c(campaignEx.getCurrentLocalRid()); this.T.a(campaignEx); if (TextUtils.isEmpty(campaignEx.getCampaignUnitId()) && !TextUtils.isEmpty(this.j)) { campaignEx.setCampaignUnitId(this.j); } AppletsModel appletsModel = AppletModelManager.getInstance().get(campaignEx); if (appletsModel != null) { this.aq = appletsModel.isSupportWxScheme(); } com.mbridge.msdk.foundation.d.b.a().a(campaignEx.getCampaignUnitId() + "_1", campaignEx); } } public void setCampaignExpired(boolean z) { try { CampaignEx campaignEx = this.z; if (campaignEx != null) { if (z) { campaignEx.setSpareOfferFlag(1); if (!com.mbridge.msdk.e.b.a()) { com.mbridge.msdk.videocommon.d.c cVar = this.l; if (cVar != null) { if (cVar.y() == 1) { this.z.setCbt(1); } else { this.z.setCbt(0); } } } else if (this.r) { this.z.setCbt(0); } else { com.mbridge.msdk.videocommon.d.c cVar2 = this.l; if (cVar2 != null) { if (cVar2.y() == 1) { this.z.setCbt(1); } else { this.z.setCbt(0); } } } } else { campaignEx.setSpareOfferFlag(0); this.z.setCbt(0); } } } catch (Exception e2) { af.b(x, e2.getMessage()); } } public void setNotchPadding(int i, int i2, int i3, int i4, int i5) { this.K = i; this.L = i2; this.M = i3; this.N = i4; this.O = i5; String a2 = s.a(i, i2, i3, i4, i5); this.P = a2; af.b(x, a2); if (getJSCommon() != null && !TextUtils.isEmpty(this.P)) { getJSCommon().b(this.P); if (this.d != null && !TextUtils.isEmpty(this.P)) { g.a().a((WebView) this.d, "oncutoutfetched", Base64.encodeToString(this.P.getBytes(), 0)); } } MBridgeVideoView mBridgeVideoView = this.mbridgeVideoView; if (mBridgeVideoView != null) { mBridgeVideoView.setNotchPadding(i2, i3, i4, i5); } MBridgeContainerView mBridgeContainerView = this.e; if (mBridgeContainerView != null) { mBridgeContainerView.setNotchPadding(i, i2, i3, i4, i5); } } public static final class b extends AppletSchemeCallBack { private CampaignEx a; public b(CampaignEx campaignEx) { this.a = campaignEx; } @Override // com.mbridge.msdk.scheme.applet.AppletSchemeCallBack public final void onRequestStart() { if (MBridgeConstans.DEBUG) { af.a(MBTempContainer.x, "start request wx scheme"); } } @Override // com.mbridge.msdk.scheme.applet.AppletSchemeCallBack public final void onRequestSuccess(String str) { if (MBridgeConstans.DEBUG) { af.a(MBTempContainer.x, "request wx scheme success"); } try { CampaignEx campaignEx = this.a; if (campaignEx != null) { campaignEx.setDeepLinkUrl(str); } } catch (Exception e) { if (MBridgeConstans.DEBUG) { af.b(MBTempContainer.x, e.getMessage()); } } } @Override // com.mbridge.msdk.scheme.applet.AppletSchemeCallBack public final void onRequestFailed(int i, String str, String str2) { if (MBridgeConstans.DEBUG) { af.a(MBTempContainer.x, "request wx scheme failed: errorCode: " + i + " errorMessage: " + str); } try { CampaignEx campaignEx = this.a; if (campaignEx != null) { campaignEx.setClickURL(str2); } } catch (Exception e) { if (MBridgeConstans.DEBUG) { af.b(MBTempContainer.x, e.getMessage()); } } } } public void onCreate() { ViewGroup viewGroup; int f2; int e2; List list; AppletsModel appletsModel; if (this.l == null) { this.l = com.mbridge.msdk.videocommon.d.b.a().a(com.mbridge.msdk.foundation.controller.c.m().k(), this.j, this.q); } try { if (this.z != null) { try { appletsModel = AppletModelManager.getInstance().get(this.z); } catch (Exception e3) { if (MBridgeConstans.DEBUG) { e3.printStackTrace(); } appletsModel = null; } if (appletsModel != null) { try { if (appletsModel.can(0)) { appletsModel.setUserClick(false); appletsModel.requestWxAppletsScheme(0, new b(this.z)); } } catch (Exception e4) { appletsModel.clearRequestState(); if (MBridgeConstans.DEBUG) { e4.printStackTrace(); } } } } } catch (Exception e5) { if (MBridgeConstans.DEBUG) { e5.printStackTrace(); } } this.ak = false; try { if (this.v) { CampaignEx campaignEx = this.z; if (campaignEx != null && campaignEx.isDynamicView()) { this.B = new com.mbridge.msdk.video.bt.module.b.d(getContext(), this.q, this.l, this.z, this.B, b(), this.j); } else { this.B = new com.mbridge.msdk.video.bt.module.b.c(this.C, this.F); } } else { this.B = new com.mbridge.msdk.video.bt.module.b.d(getContext(), this.q, this.l, this.z, this.B, b(), this.j); } registerErrorListener(new com.mbridge.msdk.video.bt.module.b.e(this.T, this.B)); a(this.l, this.z); setShowingTransparent(); int layoutID = getLayoutID(); if (layoutID <= 0) { a("layoutID not found"); return; } View inflate = this.U.inflate(layoutID, (ViewGroup) null); this.y = inflate; addView(inflate, new RelativeLayout.LayoutParams(-1, -1)); if (this.a) { setMatchParent(); } this.d = findWindVaneWebView(); MBridgeVideoView findMBridgeVideoView = findMBridgeVideoView(); this.mbridgeVideoView = findMBridgeVideoView; findMBridgeVideoView.setVideoLayout(this.z); this.mbridgeVideoView.setIsIV(this.q); this.mbridgeVideoView.setUnitId(this.j); this.mbridgeVideoView.setCamPlayOrderCallback(this.D, this.R, this.E, this.S); if (this.v) { this.mbridgeVideoView.setNotchPadding(this.L, this.M, this.N, this.O); } MBridgeContainerView findMBridgeContainerView = findMBridgeContainerView(); this.e = findMBridgeContainerView; if (this.v) { findMBridgeContainerView.setNotchPadding(this.K, this.L, this.M, this.N, this.O); } if (ah.a().a("i_l_s_t_r_i", false)) { this.mbridgeVideoView.setPlayerViewAttachListener(new MBridgeVideoView.a() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.4 /* JADX WARN: Code restructure failed: missing block: B:8:0x002b, code lost: if (r4.a.z.isCampaignIsFiltered() != false) goto L12; */ @Override // com.mbridge.msdk.video.module.MBridgeVideoView.a /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final void a() { /* r4 = this; com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.entity.CampaignEx r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.a(r0) if (r0 == 0) goto L68 com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.video.bt.module.MBTempContainer.b(r0) com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.entity.CampaignEx r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.a(r0) boolean r0 = r0.isDynamicView() if (r0 == 0) goto L3e com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this boolean r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.c(r0) if (r0 == 0) goto L2e com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.entity.CampaignEx r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.a(r0) boolean r0 = r0.isCampaignIsFiltered() if (r0 == 0) goto L4d goto L3e L2e: com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.video.bt.module.b.h r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.e(r0) com.mbridge.msdk.video.bt.module.MBTempContainer r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.same.report.d.c r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.d(r1) r0.a(r1) goto L4d L3e: com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.video.bt.module.b.h r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.e(r0) com.mbridge.msdk.video.bt.module.MBTempContainer r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.same.report.d.c r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.d(r1) r0.a(r1) L4d: com.mbridge.msdk.video.bt.module.MBTempContainer r0 = com.mbridge.msdk.video.bt.module.MBTempContainer.this android.content.Context r0 = r0.getContext() com.mbridge.msdk.video.bt.module.MBTempContainer r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.this com.mbridge.msdk.foundation.entity.CampaignEx r1 = com.mbridge.msdk.video.bt.module.MBTempContainer.a(r1) com.mbridge.msdk.video.bt.module.MBTempContainer r2 = com.mbridge.msdk.video.bt.module.MBTempContainer.this java.lang.String r2 = com.mbridge.msdk.video.bt.module.MBTempContainer.f(r2) com.mbridge.msdk.video.bt.module.MBTempContainer r3 = com.mbridge.msdk.video.bt.module.MBTempContainer.this int r3 = com.mbridge.msdk.video.bt.module.MBTempContainer.g(r3) com.mbridge.msdk.video.bt.module.b.f.a(r0, r1, r2, r3) L68: return */ throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBTempContainer.AnonymousClass4.a():void"); } }); } this.mbridgeVideoView.setIPlayVideoViewLayoutCallBack(new com.mbridge.msdk.video.dynview.e.f() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.5 @Override // com.mbridge.msdk.video.dynview.e.f public final void a() { MBTempContainer.h(MBTempContainer.this); } }); if (this.mbridgeVideoView == null || this.e == null || !initViews()) { this.c.a("not found View IDS"); Activity activity = this.i; if (activity != null) { activity.finish(); return; } return; } this.b = true; WindVaneWebView windVaneWebView = this.d; this.G = new com.mbridge.msdk.video.signal.factory.b(this.i, windVaneWebView, this.mbridgeVideoView, this.e, this.z, new e()); CampaignEx campaignEx2 = this.z; if (campaignEx2 != null && campaignEx2.getDynamicTempCode() == 5 && (list = this.R) != null) { this.G.a(list); } registerJsFactory(this.G); com.mbridge.msdk.foundation.d.b.a().a(this.j + "_1", new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.8 @Override // com.mbridge.msdk.foundation.d.a public final void showed() { String str; MBTempContainer.this.onPause(); try { JSONObject jSONObject = new JSONObject(); if (com.mbridge.msdk.foundation.controller.c.m().c() != null) { jSONObject.put("status", 1); } str = jSONObject.toString(); } catch (Throwable th) { af.b(MBTempContainer.x, th.getMessage(), th); str = ""; } g.a().a((WebView) MBTempContainer.this.d, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2)); } @Override // com.mbridge.msdk.foundation.d.a public final void close() { String str; MBTempContainer.this.onResume(); try { JSONObject jSONObject = new JSONObject(); if (com.mbridge.msdk.foundation.controller.c.m().c() != null) { jSONObject.put("status", 2); } str = jSONObject.toString(); } catch (Throwable th) { af.b(MBTempContainer.x, th.getMessage(), th); str = ""; } g.a().a((WebView) MBTempContainer.this.d, "onFeedbackAlertStatusNotify", Base64.encodeToString(str.getBytes(), 2)); } @Override // com.mbridge.msdk.foundation.d.a public final void summit(String str) { String str2; MBTempContainer.this.onResume(); try { JSONObject jSONObject = new JSONObject(); if (com.mbridge.msdk.foundation.controller.c.m().c() != null) { jSONObject.put("status", 2); } str2 = jSONObject.toString(); } catch (Throwable th) { af.b(MBTempContainer.x, th.getMessage(), th); str2 = ""; } g.a().a((WebView) MBTempContainer.this.d, "onFeedbackAlertStatusNotify", Base64.encodeToString(str2.getBytes(), 2)); } }); g(); if (windVaneWebView != null) { ViewGroup viewGroup2 = (ViewGroup) this.y.findViewById(x.a(getContext(), "mbridge_video_templete_webview_parent", "id")); windVaneWebView.setApiManagerJSFactory(this.G); if (windVaneWebView.getParent() != null) { defaultLoad(0, "preload template webview is null or load error"); return; } if (windVaneWebView.getObject() instanceof k) { getJSCommon().a(this.ao); getJSCommon().a(this.am); getJSCommon().a(this.an); getJSCommon().a(this.p); getJSCommon().a(this.j); getJSCommon().a(this.l); getJSCommon().a(new e()); CampaignEx campaignEx3 = this.z; if (campaignEx3 != null && (campaignEx3.isMraid() || this.z.isActiveOm())) { com.mbridge.msdk.mbsignalcommon.mraid.d dVar = new com.mbridge.msdk.mbsignalcommon.mraid.d(getContext()); this.al = dVar; dVar.c(); this.al.a(); this.al.a(new d.b() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.9 @Override // com.mbridge.msdk.mbsignalcommon.mraid.d.b public final void a(double d2) { MBridgeContainerView mBridgeContainerView; af.b(MBTempContainer.x, "volume is : " + d2); try { if (!MBTempContainer.this.z.isMraid() || (mBridgeContainerView = MBTempContainer.this.e) == null || mBridgeContainerView.getH5EndCardView() == null) { return; } MBTempContainer.this.e.getH5EndCardView().volumeChange(d2); } catch (Exception e6) { af.b(MBTempContainer.x, e6.getMessage()); } } }); } getJSContainerModule().readyStatus(((k) windVaneWebView.getObject()).r()); try { if (this.d != null) { int i = getResources().getConfiguration().orientation; if (d()) { f2 = ak.h(getContext()); e2 = ak.g(getContext()); if (com.mbridge.msdk.foundation.tools.e.a(getContext())) { int c2 = ak.c(getContext()); if (i == 2) { f2 += c2; } else { e2 += c2; } } } else { f2 = ak.f(getContext()); e2 = ak.e(getContext()); } int b2 = this.z.getRewardTemplateMode().b(); if (c(this.z) == 1) { b2 = i; } getJSNotifyProxy().a(i, b2, f2, e2); JSONObject jSONObject = new JSONObject(); jSONObject.put(com.mbridge.msdk.foundation.same.a.l, ak.d(getContext())); try { if (this.n != null) { JSONObject jSONObject2 = new JSONObject(); jSONObject2.put("name", this.n.a()); jSONObject2.put("amount", this.n.b()); jSONObject2.put("id", this.o); jSONObject.put("userId", this.m); jSONObject.put("reward", jSONObject2); jSONObject.put("playVideoMute", this.p); jSONObject.put("extra", this.Q); } } catch (JSONException e6) { af.a(x, e6.getMessage()); } catch (Exception e7) { af.a(x, e7.getMessage()); } String jSONObject3 = jSONObject.toString(); com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e(); eVar.a("type", 2); com.mbridge.msdk.foundation.same.report.d.d.a().a("2000133", this.z, eVar); getJSNotifyProxy().a(jSONObject3); g.a().a((WebView) this.d, "oncutoutfetched", Base64.encodeToString(this.P.getBytes(), 0)); getJSCommon().b(true); if (com.mbridge.msdk.e.b.a()) { setChinaCallBackStatus(this.d); } loadModuleDatas(); this.f.postDelayed(this.g, 2000L); } } catch (Exception e8) { if (MBridgeConstans.DEBUG) { e8.printStackTrace(); } } ((k) windVaneWebView.getObject()).m.a(); if (this.v) { getJSCommon().e(this.W); } } if (getJSCommon().a() == 1 && (viewGroup = (ViewGroup) this.y.findViewById(x.a(getContext(), "mbridge_video_templete_webview_parent", "id"))) != null) { ((ViewGroup) this.y).removeView(viewGroup); ((ViewGroup) this.y).addView(viewGroup, 1); } viewGroup2.addView(windVaneWebView, new ViewGroup.LayoutParams(-1, -1)); return; } defaultLoad(0, "preload template webview is null or load error"); } catch (Throwable th) { th.printStackTrace(); a("onCreate error" + th); } } public void loadModuleDatas() { int e2; int i; int i2; k b2 = b(this.z); int n = b2 != null ? b2.n() : 0; if (n != 0) { this.p = n; } int f2 = this.l.f(); int c2 = c(); int i3 = c2 != 0 ? c2 : f2; this.mbridgeVideoView.setSoundState(this.p); this.mbridgeVideoView.setCampaign(this.z); this.mbridgeVideoView.setPlayURL(this.A.t()); CampaignEx campaignEx = this.z; if (campaignEx != null && campaignEx.getVst() > -2) { e2 = this.z.getVst(); } else { e2 = this.l.e(); } CampaignEx campaignEx2 = this.z; if (campaignEx2 != null && campaignEx2.getDynamicTempCode() == 5 && (i2 = this.E) > 1) { e2 = a(e2, i2); this.z.setVst(e2); } this.mbridgeVideoView.setVideoSkipTime(e2); this.mbridgeVideoView.setCloseAlert(this.l.i()); this.mbridgeVideoView.setBufferTimeout(h()); int i4 = e2; this.mbridgeVideoView.setNotifyListener(new com.mbridge.msdk.video.module.a.a.n(this.G, this.z, this.n, this.A, b(), this.j, i3, e2, new f(), this.l.y(), this.v, this.l.C())); this.mbridgeVideoView.setShowingTransparent(this.af); this.mbridgeVideoView.setAdSession(this.am); if (this.q && ((i = this.s) == com.mbridge.msdk.foundation.same.a.H || i == com.mbridge.msdk.foundation.same.a.I)) { this.mbridgeVideoView.setIVRewardEnable(i, this.t, this.u); this.mbridgeVideoView.setDialogRole(getJSCommon() != null ? getJSCommon().h() : 1); } this.e.setCampaign(this.z); this.e.addOrderViewData(this.R); this.e.setUnitID(this.j); this.e.setCloseDelayTime(i()); this.e.setPlayCloseBtnTm(this.l.h()); this.e.setVideoInteractiveType(this.l.g()); this.e.setEndscreenType(this.l.q()); this.e.setVideoSkipTime(i4); this.e.setShowingTransparent(this.af); this.e.setJSFactory(this.G); if (this.z.getPlayable_ads_without_video() == 2) { this.e.setNotifyListener(new com.mbridge.msdk.video.module.a.a.h(this.z, this.A, this.n, b(), this.j, new d(), this.l.y(), this.v)); this.e.preLoadData(this.G); this.e.showPlayableView(); } else { this.e.setNotifyListener(new com.mbridge.msdk.video.module.a.a.c(this.G, this.z, this.n, this.A, b(), this.j, new c(this.i, this.z), this.l.y(), this.v)); this.e.preLoadData(this.G); this.mbridgeVideoView.preLoadData(this.G); } if (this.af) { this.e.setMBridgeClickMiniCardViewTransparent(); } } public static /* synthetic */ void b(MBTempContainer mBTempContainer) { try { com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e(); MBridgeVideoView mBridgeVideoView = mBTempContainer.mbridgeVideoView; if (mBridgeVideoView != null && mBridgeVideoView.notifyListener != null) { eVar.a("notify_listener", 1); com.mbridge.msdk.video.module.a.a aVar = mBTempContainer.mbridgeVideoView.notifyListener; if (aVar instanceof com.mbridge.msdk.video.module.a.a.n) { eVar.a("listener_type", 1); } else if (aVar instanceof m) { eVar.a("listener_type", 2); } else { eVar.a("listener_type", 3); } } else { eVar.a("notify_listener", 0); } com.mbridge.msdk.foundation.same.report.d.c cVar = mBTempContainer.T; if (cVar != null) { cVar.a("2000130", eVar); } } catch (Exception e2) { if (MBridgeConstans.DEBUG) { e2.printStackTrace(); } } } public static /* synthetic */ void h(MBTempContainer mBTempContainer) { try { com.mbridge.msdk.foundation.same.report.d.e eVar = new com.mbridge.msdk.foundation.same.report.d.e(); eVar.a("temp_container", mBTempContainer.getWidth() + "x" + mBTempContainer.getHeight()); if (mBTempContainer.d != null) { eVar.a("web_view", mBTempContainer.d.getWidth() + "x" + mBTempContainer.d.getHeight()); } if (mBTempContainer.mbridgeVideoView != null) { eVar.a("mbridge_video_view", mBTempContainer.mbridgeVideoView.getWidth() + "x" + mBTempContainer.mbridgeVideoView.getHeight()); if (mBTempContainer.mbridgeVideoView.mPlayerView != null) { eVar.a("player_view", mBTempContainer.mbridgeVideoView.mPlayerView.getWidth() + "x" + mBTempContainer.mbridgeVideoView.mPlayerView.getHeight()); } } com.mbridge.msdk.foundation.same.report.d.c cVar = mBTempContainer.T; if (cVar != null) { cVar.a("2000136", eVar); } } catch (Exception e2) { if (MBridgeConstans.DEBUG) { e2.printStackTrace(); } } } public static /* synthetic */ void r(MBTempContainer mBTempContainer) { int i; try { com.mbridge.msdk.video.bt.module.a.b bVar = mBTempContainer.C; if (bVar != null) { if (mBTempContainer.q && ((i = mBTempContainer.s) == com.mbridge.msdk.foundation.same.a.H || i == com.mbridge.msdk.foundation.same.a.I)) { boolean z = true; if (mBTempContainer.I != 1) { z = false; } bVar.a(z, mBTempContainer.H); } mBTempContainer.C.a(mBTempContainer.F, mBTempContainer.ac, mBTempContainer.n); return; } Activity activity = mBTempContainer.i; if (activity != null) { activity.finish(); } } catch (Exception unused) { Activity activity2 = mBTempContainer.i; if (activity2 != null) { activity2.finish(); } } } public static /* synthetic */ void P(MBTempContainer mBTempContainer) { if (mBTempContainer.isLoadSuccess()) { mBTempContainer.i.runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.10 @Override // java.lang.Runnable public final void run() { MBTempContainer.this.aa.setBackgroundColor(0); MBTempContainer.this.aa.setVisibility(0); MBTempContainer.this.aa.bringToFront(); } }); } } public static /* synthetic */ void R(MBTempContainer mBTempContainer) { if (mBTempContainer.isLoadSuccess()) { mBTempContainer.i.runOnUiThread(new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBTempContainer.2 @Override // java.lang.Runnable public final void run() { MBTempContainer.this.aa.setVisibility(8); } }); } } }