Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,338 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.a;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.videocommon.d.c;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class BTBaseView extends FrameLayout {
public static final String TAG = "BTBaseView";
protected static int n = 0;
protected static int o = 1;
protected Context a;
protected CampaignEx b;
protected String c;
protected String d;
protected c e;
protected LayoutInflater f;
protected int g;
protected boolean h;
protected float i;
protected float j;
protected Rect k;
protected int l;
protected int m;
public void a() {
}
public CampaignEx getCampaign() {
return this.b;
}
public String getInstanceId() {
return this.d;
}
public Rect getRect() {
return this.k;
}
public String getUnitId() {
return this.c;
}
public int getViewHeight() {
return this.m;
}
public int getViewWidth() {
return this.l;
}
public abstract void init(Context context);
public abstract void onDestory();
public void setCampaign(CampaignEx campaignEx) {
this.b = campaignEx;
}
public void setInstanceId(String str) {
this.d = str;
}
public void setLayout(int i, int i2) {
this.l = i;
this.m = i2;
}
public void setRect(Rect rect) {
this.k = rect;
}
public void setRewardUnitSetting(c cVar) {
this.e = cVar;
}
public void setUnitId(String str) {
this.c = str;
}
public BTBaseView(Context context) {
this(context, null);
}
public BTBaseView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.d = "";
this.g = 1;
this.h = false;
this.a = context;
this.f = LayoutInflater.from(context);
init(context);
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
this.g = configuration.orientation;
super.onConfigurationChanged(configuration);
}
public void onSelfConfigurationChanged(Configuration configuration) {
this.g = configuration.orientation;
}
public int findID(String str) {
return x.a(this.a.getApplicationContext(), str, "id");
}
public int findLayout(String str) {
return x.a(this.a.getApplicationContext(), str, TtmlNode.TAG_LAYOUT);
}
public int findColor(String str) {
return x.a(this.a.getApplicationContext(), str, "color");
}
public int findDrawable(String str) {
return x.a(this.a.getApplicationContext(), str, "drawable");
}
public boolean isNotNULL(View... viewArr) {
if (viewArr == null) {
return false;
}
int length = viewArr.length;
int i = 0;
boolean z = false;
while (i < length) {
if (viewArr[i] == null) {
return false;
}
i++;
z = true;
}
return z;
}
public void setMatchParent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
} else {
layoutParams.height = -1;
layoutParams.width = -1;
}
}
public void setWrapContent() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams == null) {
setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
} else {
layoutParams.height = -2;
layoutParams.width = -2;
}
}
public void defaultShow() {
af.a(TAG, "defaultShow");
}
public boolean isLandscape() {
return this.a.getResources().getConfiguration().orientation == 2;
}
public void setLayoutCenter(int i, int i2) {
FrameLayout.LayoutParams parentFrameLayoutParams = getParentFrameLayoutParams();
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.addRule(13);
if (i != -999) {
parentRelativeLayoutParams.width = i;
}
if (i2 != -999) {
parentRelativeLayoutParams.height = i2;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.gravity = 17;
if (i != -999) {
parentLinearLayoutParams.width = i;
}
if (i2 != -999) {
parentLinearLayoutParams.height = i2;
}
setLayoutParams(parentLinearLayoutParams);
return;
}
if (parentFrameLayoutParams != null) {
parentFrameLayoutParams.gravity = 17;
if (i != -999) {
parentFrameLayoutParams.width = i;
}
if (i2 != -999) {
parentFrameLayoutParams.height = i2;
}
setLayoutParams(parentFrameLayoutParams);
}
}
public void setLayoutParam(int i, int i2, int i3, int i4) {
FrameLayout.LayoutParams parentFrameLayoutParams = getParentFrameLayoutParams();
RelativeLayout.LayoutParams parentRelativeLayoutParams = getParentRelativeLayoutParams();
LinearLayout.LayoutParams parentLinearLayoutParams = getParentLinearLayoutParams();
if (parentRelativeLayoutParams != null) {
parentRelativeLayoutParams.topMargin = i2;
parentRelativeLayoutParams.leftMargin = i;
if (i3 != -999) {
parentRelativeLayoutParams.width = i3;
}
if (i4 != -999) {
parentRelativeLayoutParams.height = i4;
}
setLayoutParams(parentRelativeLayoutParams);
return;
}
if (parentLinearLayoutParams != null) {
parentLinearLayoutParams.topMargin = i2;
parentLinearLayoutParams.leftMargin = i;
if (i3 != -999) {
parentLinearLayoutParams.width = i3;
}
if (i4 != -999) {
parentLinearLayoutParams.height = i4;
}
setLayoutParams(parentLinearLayoutParams);
return;
}
if (parentFrameLayoutParams != null) {
parentFrameLayoutParams.topMargin = i2;
parentFrameLayoutParams.leftMargin = i;
if (i3 != -999) {
parentFrameLayoutParams.width = i3;
}
if (i4 != -999) {
parentFrameLayoutParams.height = i4;
}
setLayoutParams(parentFrameLayoutParams);
}
}
public RelativeLayout.LayoutParams getParentRelativeLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof RelativeLayout.LayoutParams) {
return (RelativeLayout.LayoutParams) layoutParams;
}
return null;
}
public LinearLayout.LayoutParams getParentLinearLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof LinearLayout.LayoutParams) {
return (LinearLayout.LayoutParams) layoutParams;
}
return null;
}
public FrameLayout.LayoutParams getParentFrameLayoutParams() {
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams instanceof FrameLayout.LayoutParams) {
return (FrameLayout.LayoutParams) layoutParams;
}
return null;
}
@Override // android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.i = motionEvent.getRawX();
this.j = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
public final JSONObject a(int i) {
JSONObject jSONObject;
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject = new JSONObject();
} catch (JSONException e) {
e = e;
}
try {
jSONObject.put(a.h, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.i));
jSONObject.put(a.i, ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), this.j));
jSONObject.put(a.m, i);
try {
this.g = getContext().getResources().getConfiguration().orientation;
} catch (Exception e2) {
e2.printStackTrace();
}
jSONObject.put(a.k, this.g);
jSONObject.put(a.l, ak.d(getContext()));
return jSONObject;
} catch (JSONException e3) {
e = e3;
jSONObject2 = jSONObject;
e.printStackTrace();
return jSONObject2;
}
}
public static void a(WebView webView, String str, String str2) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", n);
jSONObject.put("id", str2);
jSONObject.put("data", new JSONObject());
g.a().a(webView, str, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(webView, e.getMessage());
af.a(TAG, e.getMessage());
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.video.bt.module.a.b;
import com.mbridge.msdk.video.bt.module.b.h;
import com.mbridge.msdk.video.module.MBridgeVideoView;
import com.mbridge.msdk.video.signal.container.AbstractJSContainer;
/* loaded from: classes4.dex */
public class MBTempContainerDiff extends AbstractJSContainer {
public MBridgeVideoView mbridgeVideoView;
public boolean checkChinaSendToServerDiff(h hVar) {
return false;
}
public boolean checkChinaShowingAlertViewState() {
return false;
}
public void setChinaBrowserCallBack(b bVar, String str, h hVar, CampaignEx campaignEx) {
}
public void setChinaCTACallBack() {
}
public void setChinaCallBackStatus(WindVaneWebView windVaneWebView) {
}
public void setChinaDestroy() {
}
public void setChinaJsCommonContext() {
}
public MBTempContainerDiff(Context context) {
super(context);
}
public MBTempContainerDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.util.Base64;
import android.webkit.WebView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.bt.a.d;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTLayout extends BTBaseView {
private WebView p;
public WebView getBtWebView() {
return this.p;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setWebView(WebView webView) {
this.p = webView;
}
public MBridgeBTLayout(Context context) {
super(context);
}
public MBridgeBTLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
if (this.p != null) {
try {
CampaignEx campaignEx = this.b;
if (campaignEx == null || !campaignEx.isDynamicView()) {
JSONObject jSONObject = new JSONObject();
if (configuration.orientation == 2) {
jSONObject.put("orientation", "landscape");
} else {
jSONObject.put("orientation", "portrait");
}
jSONObject.put("instanceId", this.d);
g.a().a(this.p, "orientation", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void onBackPressed() {
if (this.p != null) {
d.c().a(this.p, "onSystemBackPressed", this.d);
}
}
public void broadcast(String str, JSONObject jSONObject) {
if (this.p != null) {
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", BTBaseView.n);
jSONObject2.put("id", getInstanceId());
jSONObject2.put("eventName", str);
jSONObject2.put("data", jSONObject);
g.a().a(this.p, "broadcast", Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(this.p, "broadcast", getInstanceId());
}
}
}
public void notifyEvent(String str) {
WebView webView = this.p;
if (webView != null) {
BTBaseView.a(webView, str, this.d);
}
}
}

View File

@@ -0,0 +1,450 @@
package com.mbridge.msdk.video.bt.module;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.c.b;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.video.module.a.a.e;
import com.mbridge.msdk.video.module.a.a.j;
import com.mbridge.msdk.video.signal.a.k;
import com.mbridge.msdk.videocommon.d.c;
import com.mbridge.msdk.videocommon.view.RoundImageView;
import com.mbridge.msdk.videocommon.view.StarLevelView;
import com.mbridge.msdk.widget.a;
import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTNativeEC extends MBridgeBTNativeECDiff {
private TextView A;
private StarLevelView B;
private boolean C;
private boolean D;
private int E;
private Runnable F;
private boolean G;
private View H;
private String I;
private k J;
private WebView K;
private ViewGroup p;
private ViewGroup q;
private RelativeLayout r;
private ImageView s;
private RoundImageView t;
private ImageView u;
private ImageView v;
private ImageView w;
private ImageView x;
private TextView y;
private TextView z;
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTNativeECDiff, com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setCreateWebView(WebView webView) {
this.K = webView;
}
public void setJSCommon(k kVar) {
this.J = kVar;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setUnitId(String str) {
this.I = str;
}
public MBridgeBTNativeEC(Context context) {
super(context);
this.C = false;
this.D = false;
this.E = 0;
this.G = false;
}
public MBridgeBTNativeEC(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.C = false;
this.D = false;
this.E = 0;
this.G = false;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
if (this.F == null) {
this.F = new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.1
@Override // java.lang.Runnable
public final void run() {
MBridgeBTNativeEC.this.D = true;
if (MBridgeBTNativeEC.this.H != null) {
MBridgeBTNativeEC.this.H.setVisibility(0);
}
}
};
}
Runnable runnable = this.F;
if (runnable != null) {
postDelayed(runnable, this.E * 1000);
}
if (!this.h && this.K != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("id", this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("unitId", this.I);
jSONObject.put("data", jSONObject2);
af.a(BTBaseView.TAG, "NativeEC Call H5 onCloseBtnClicked " + jSONObject.toString());
} catch (JSONException e) {
af.a(BTBaseView.TAG, e.getMessage());
}
g.a().a(this.K, "onCloseBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
if (this.K != null) {
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put("id", this.d);
JSONObject jSONObject4 = new JSONObject();
jSONObject4.put("unitId", this.I);
jSONObject3.put("data", jSONObject4);
af.a(BTBaseView.TAG, "NativeEC Call H5 onEndCardShow " + jSONObject3.toString());
} catch (JSONException e2) {
af.a(BTBaseView.TAG, e2.getMessage());
}
g.a().a(this.K, "onNativeECShow", Base64.encodeToString(jSONObject3.toString().getBytes(), 2));
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
Runnable runnable = this.F;
if (runnable != null) {
removeCallbacks(runnable);
}
}
public void preLoadData() {
Bitmap blurBitmap;
try {
CampaignEx campaignEx = this.b;
if (campaignEx == null || !this.h) {
return;
}
if (campaignEx.getCbd() > -2) {
this.E = this.b.getCbd();
} else {
c cVar = this.e;
if (cVar != null) {
this.E = cVar.p();
}
}
b.a(this.a.getApplicationContext()).a(this.b.getImageUrl(), new e(this.t, this.b, this.I));
b.a(this.a.getApplicationContext()).a(this.b.getIconUrl(), new j(this.u, ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 8.0f)));
this.y.setText(this.b.getAppName());
this.z.setText(this.b.getAppDesc());
this.A.setText(this.b.getNumberRating() + ")");
this.B.removeAllViews();
if (com.mbridge.msdk.e.b.a()) {
setChinaCTAData(this.b);
}
double rating = this.b.getRating();
if (rating <= 0.0d) {
rating = 5.0d;
}
this.B.initScore(rating);
try {
Bitmap a = a(this.t.getDrawable());
if (a != null && (blurBitmap = blurBitmap(a)) != null) {
this.s.setImageBitmap(blurBitmap);
}
} catch (Throwable unused) {
this.s.setVisibility(8);
}
if (!TextUtils.isEmpty(this.b.getendcard_url()) && this.b.getendcard_url().contains("alecfc=1")) {
this.C = true;
}
if (!TextUtils.isEmpty(this.b.getendcard_url()) && this.b.getendcard_url().contains("wlgo=1")) {
this.G = true;
}
String language = Locale.getDefault().getLanguage();
if (!TextUtils.isEmpty(language) && language.equals("zh")) {
this.v.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_cn", "drawable", com.mbridge.msdk.foundation.controller.c.m().g())));
} else {
this.v.setImageDrawable(getResources().getDrawable(getResources().getIdentifier("mbridge_reward_flag_en", "drawable", com.mbridge.msdk.foundation.controller.c.m().g())));
}
if (!this.G) {
this.v.setVisibility(4);
this.x.setVisibility(4);
}
ak.a(2, this.w, this.b, this.a, true, null);
if (this.D) {
return;
}
this.H.setVisibility(8);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onSelfConfigurationChanged(Configuration configuration) {
super.onSelfConfigurationChanged(configuration);
int i = configuration.orientation;
this.g = i;
if (i == 2) {
removeView(this.p);
a(this.q);
} else {
removeView(this.q);
a(this.p);
}
}
private void a(View view) {
if (view == null) {
init(this.a);
preLoadData();
return;
}
if (view.getParent() != null) {
((ViewGroup) view.getParent()).removeView(view);
}
addView(view);
b(view);
a();
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public final void a() {
if (this.h) {
this.r.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTNativeEC.this.C) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 1, view.getContext());
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
}
});
this.H.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTNativeEC.this.K != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("id", MBridgeBTNativeEC.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("unitId", MBridgeBTNativeEC.this.I);
jSONObject.put("data", jSONObject2);
af.a(BTBaseView.TAG, "NativeEC Call H5 onCloseBtnClicked " + jSONObject.toString());
} catch (JSONException e) {
af.a(BTBaseView.TAG, e.getMessage());
}
g.a().a(MBridgeBTNativeEC.this.K, "onCloseBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
}
});
this.ctaView.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.4
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
this.u.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.5
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (!com.mbridge.msdk.e.b.a() || MBridgeBTNativeEC.this.checkChinaProgressBarStatus()) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
}
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
this.t.setOnClickListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.6
@Override // com.mbridge.msdk.widget.a
public final void onNoDoubleClick(View view) {
if (!com.mbridge.msdk.e.b.a() || MBridgeBTNativeEC.this.checkChinaProgressBarStatus()) {
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, 0, view.getContext());
}
MBridgeBTNativeEC.a(MBridgeBTNativeEC.this, view.getX(), view.getY());
}
});
}
}
private boolean b(View view) {
try {
this.r = (RelativeLayout) view.findViewById(findID("mbridge_native_ec_layout"));
this.s = (ImageView) view.findViewById(findID("mbridge_iv_adbanner_bg"));
this.t = (RoundImageView) view.findViewById(findID("mbridge_iv_adbanner"));
this.u = (ImageView) view.findViewById(findID("mbridge_iv_icon"));
this.v = (ImageView) view.findViewById(findID("mbridge_iv_flag"));
this.w = (ImageView) view.findViewById(findID("mbridge_iv_link"));
this.y = (TextView) view.findViewById(findID("mbridge_tv_apptitle"));
this.z = (TextView) view.findViewById(findID("mbridge_tv_appdesc"));
this.A = (TextView) view.findViewById(findID("mbridge_tv_number"));
this.B = (StarLevelView) view.findViewById(findID("mbridge_sv_starlevel"));
this.H = view.findViewById(findID("mbridge_iv_close"));
this.ctaView = view.findViewById(findID("mbridge_tv_cta"));
this.x = (ImageView) view.findViewById(findID("mbridge_iv_logo"));
return isNotNULL(this.s, this.t, this.u, this.y, this.z, this.A, this.B, this.H, this.ctaView);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return false;
}
}
@TargetApi(17)
public Bitmap blurBitmap(Bitmap bitmap) {
try {
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
RenderScript create = RenderScript.create(this.a.getApplicationContext());
ScriptIntrinsicBlur create2 = ScriptIntrinsicBlur.create(create, Element.U8_4(create));
Allocation createFromBitmap = Allocation.createFromBitmap(create, bitmap);
Allocation createFromBitmap2 = Allocation.createFromBitmap(create, createBitmap);
create2.setRadius(10.0f);
create2.setInput(createFromBitmap);
create2.forEach(createFromBitmap2);
createFromBitmap2.copyTo(createBitmap);
bitmap.recycle();
create.destroy();
return createBitmap;
} catch (Throwable unused) {
return null;
}
}
private Bitmap a(Drawable drawable) {
try {
int intrinsicWidth = drawable.getIntrinsicWidth();
int intrinsicHeight = drawable.getIntrinsicHeight();
Bitmap createBitmap = Bitmap.createBitmap(intrinsicWidth, intrinsicHeight, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
drawable.setBounds(0, 0, intrinsicWidth, intrinsicHeight);
drawable.draw(canvas);
return createBitmap;
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
return null;
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTNativeECDiff, com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
boolean b;
int findLayout = findLayout(isLandscape() ? "mbridge_reward_endcard_native_land" : "mbridge_reward_endcard_native_hor");
if (findLayout > 0) {
if (isLandscape()) {
ViewGroup viewGroup = (ViewGroup) this.f.inflate(findLayout, (ViewGroup) null);
this.q = viewGroup;
addView(viewGroup);
b = b(this.q);
} else {
ViewGroup viewGroup2 = (ViewGroup) this.f.inflate(findLayout, (ViewGroup) null);
this.p = viewGroup2;
addView(viewGroup2);
b = b(this.p);
}
this.h = b;
a();
}
}
/* JADX WARN: Removed duplicated region for block: B:19:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:8:0x001e A[Catch: all -> 0x0010, TryCatch #0 {all -> 0x0010, blocks: (B:3:0x0001, B:5:0x0006, B:6:0x001a, B:8:0x001e, B:10:0x0024, B:11:0x0029, B:13:0x002d, B:14:0x0034, B:23:0x0016), top: B:2:0x0001 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static /* synthetic */ void a(com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC r2, int r3, android.content.Context r4) {
/*
r0 = 0
org.json.JSONObject r1 = new org.json.JSONObject // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L15
r1.<init>() // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L15
java.lang.String r0 = com.mbridge.msdk.foundation.same.a.j // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
org.json.JSONObject r3 = r2.a(r3) // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
r1.put(r0, r3) // Catch: java.lang.Throwable -> L10 org.json.JSONException -> L12
goto L1a
L10:
r2 = move-exception
goto L39
L12:
r3 = move-exception
r0 = r1
goto L16
L15:
r3 = move-exception
L16:
r3.printStackTrace() // Catch: java.lang.Throwable -> L10
r1 = r0
L1a:
com.mbridge.msdk.video.signal.a.k r3 = r2.J // Catch: java.lang.Throwable -> L10
if (r3 == 0) goto L42
boolean r3 = com.mbridge.msdk.e.b.a() // Catch: java.lang.Throwable -> L10
if (r3 == 0) goto L29
com.mbridge.msdk.video.signal.a.k r3 = r2.J // Catch: java.lang.Throwable -> L10
r2.doChinaJumpClick(r4, r3) // Catch: java.lang.Throwable -> L10
L29:
com.mbridge.msdk.video.signal.a.k r2 = r2.J // Catch: java.lang.Throwable -> L10
if (r1 == 0) goto L32
java.lang.String r3 = r1.toString() // Catch: java.lang.Throwable -> L10
goto L34
L32:
java.lang.String r3 = ""
L34:
r4 = 1
r2.click(r4, r3) // Catch: java.lang.Throwable -> L10
goto L42
L39:
java.lang.String r3 = "BTBaseView"
java.lang.String r2 = r2.getMessage()
com.mbridge.msdk.foundation.tools.af.a(r3, r2)
L42:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC.a(com.mbridge.msdk.video.bt.module.MBridgeBTNativeEC, int, android.content.Context):void");
}
public static /* synthetic */ void a(MBridgeBTNativeEC mBridgeBTNativeEC, float f, float f2) {
if (mBridgeBTNativeEC.K != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", mBridgeBTNativeEC.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(f));
jSONObject2.put("y", String.valueOf(f2));
jSONObject.put("data", jSONObject2);
g.a().a(mBridgeBTNativeEC.K, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(mBridgeBTNativeEC.K, "onClicked", mBridgeBTNativeEC.d);
}
}
}
}

View File

@@ -0,0 +1,38 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.video.signal.a.k;
/* loaded from: classes4.dex */
public class MBridgeBTNativeECDiff extends BTBaseView {
public View ctaView;
public boolean checkChinaProgressBarStatus() {
return false;
}
public void doChinaJumpClick(Context context, k kVar) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public void setChinaCTAData(CampaignEx campaignEx) {
}
public MBridgeBTNativeECDiff(Context context) {
super(context);
}
public MBridgeBTNativeECDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -0,0 +1,23 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.util.AttributeSet;
/* loaded from: classes4.dex */
public class MBridgeBTRootLayout extends BTBaseView {
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
}
public MBridgeBTRootLayout(Context context) {
super(context);
}
public MBridgeBTRootLayout(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -0,0 +1,964 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
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.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.dycreator.baseview.cusview.SoundImageView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.d.b;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.d.e;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.foundation.tools.ap;
import com.mbridge.msdk.foundation.tools.x;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener;
import com.mbridge.msdk.playercommon.PlayerErrorConstant;
import com.mbridge.msdk.playercommon.PlayerView;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.widget.FeedBackButton;
import java.io.File;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTVideoView extends BTBaseView {
private static boolean K = false;
private static long Q;
private AdSession A;
private AdEvents B;
private MediaEvents C;
private a D;
private int E;
private int F;
private boolean G;
private int H;
private int I;
private String J;
private boolean L;
private boolean M;
private boolean N;
private RelativeLayout O;
private ProgressBar P;
private PlayerView p;
private SoundImageView q;
private TextView r;
private View s;
private FeedBackButton t;
private ImageView u;
private WebView v;
private com.mbridge.msdk.videocommon.download.a w;
private int x;
private int y;
private int z;
public AdEvents getAdEvents() {
return this.B;
}
public AdSession getAdSession() {
return this.A;
}
public int getMute() {
return this.E;
}
public MediaEvents getVideoEvents() {
return this.C;
}
public void setAdEvents(AdEvents adEvents) {
this.B = adEvents;
}
public void setAdSession(AdSession adSession) {
this.A = adSession;
}
public void setCreateWebView(WebView webView) {
this.v = webView;
}
public void setOrientation(int i) {
this.I = i;
}
public void setShowClose(int i) {
this.y = i;
}
public void setShowMute(int i) {
this.z = i;
}
public void setShowTime(int i) {
this.x = i;
}
public void setVideoEvents(MediaEvents mediaEvents) {
this.C = mediaEvents;
a aVar = this.D;
if (aVar != null) {
aVar.c = mediaEvents;
}
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setVideoEvents(mediaEvents);
}
}
public MBridgeBTVideoView(Context context) {
super(context);
this.x = 0;
this.y = 0;
this.z = 0;
this.E = 2;
this.G = false;
this.H = 2;
this.I = 1;
this.L = false;
this.M = false;
this.N = false;
}
public MBridgeBTVideoView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.x = 0;
this.y = 0;
this.z = 0;
this.E = 2;
this.G = false;
this.H = 2;
this.I = 1;
this.L = false;
this.M = false;
this.N = false;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setCampaign(CampaignEx campaignEx) {
super.setCampaign(campaignEx);
if (campaignEx != null && campaignEx.getVideoCompleteTime() > 0) {
this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_video_time_count_num_bg", "drawable"));
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, ak.a(c.m().c(), 30.0f));
int a2 = ak.a(c.m().c(), 5.0f);
layoutParams.setMargins(a2, 0, 0, 0);
this.r.setPadding(a2, 0, a2, 0);
this.r.setLayoutParams(layoutParams);
return;
}
this.r.setBackgroundResource(x.a(c.m().c(), "mbridge_reward_shape_progress", "drawable"));
this.r.setWidth(ak.a(c.m().c(), 30.0f));
}
public void soundOperate(int i, int i2, String str) {
if (this.h) {
this.E = i;
if (i == 1) {
this.q.setSoundStatus(false);
this.p.closeSound();
} else if (i == 2) {
this.q.setSoundStatus(true);
this.p.openSound();
}
if (i2 == 1) {
this.q.setVisibility(8);
} else if (i2 == 2) {
this.q.setVisibility(0);
}
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
try {
mediaEvents.volumeChange(this.p.getVolume());
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
int findLayout = findLayout("mbridge_reward_videoview_item");
if (findLayout > 0) {
this.f.inflate(findLayout, this);
boolean c = c();
this.h = c;
if (!c) {
af.b(BTBaseView.TAG, "MBridgeVideoView init fail");
}
a();
}
K = false;
}
public void onResume() {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setDesk(true);
this.p.setIsCovered(false);
if (this.M) {
this.p.start(true);
}
this.p.resumeOMSDK();
}
}
public void onPause() {
PlayerView playerView = this.p;
if (playerView != null) {
boolean isPlayIng = playerView.isPlayIng();
this.M = isPlayIng;
this.p.setIsBTVideoPlaying(isPlayIng);
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
this.p.setVideoEvents(mediaEvents);
}
this.p.onPause();
}
}
public void onStop() {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setIsCovered(true);
}
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
View rootView;
super.onAttachedToWindow();
if (!this.N) {
this.H = d.c().e(this.c);
}
View view = this.s;
if (view != null) {
view.setVisibility(this.y == 0 ? 8 : 0);
}
SoundImageView soundImageView = this.q;
if (soundImageView != null) {
soundImageView.setVisibility(this.z == 0 ? 8 : 0);
}
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
campaignEx.setCampaignUnitId(this.c);
b.a().a(this.c + "_1", this.b);
}
TextView textView = this.r;
if (textView != null) {
textView.setVisibility(this.x == 0 ? 8 : 0);
if (this.r.getVisibility() == 0 && b.a().b()) {
b.a().a(this.c + "_1", this.t);
}
}
if (this.A == null || (rootView = getRootView()) == null) {
return;
}
this.A.removeFriendlyObstruction(rootView);
}
public boolean playMute() {
try {
PlayerView playerView = this.p;
if (playerView != null && this.v != null) {
playerView.closeSound();
this.q.setSoundStatus(false);
this.E = 1;
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.volumeChange(0.0f);
}
} catch (Exception e) {
af.a("OMSDK", e.getMessage());
}
BTBaseView.a(this.v, "onPlayerMute", this.d);
return true;
}
} catch (Exception e2) {
af.b(BTBaseView.TAG, e2.getMessage());
}
return false;
}
public boolean playUnMute() {
try {
PlayerView playerView = this.p;
if (playerView == null || this.v == null) {
return false;
}
playerView.openSound();
this.q.setSoundStatus(true);
this.E = 2;
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.volumeChange(1.0f);
}
} catch (Exception e) {
af.a("OMSDK", e.getMessage());
}
BTBaseView.a(this.v, "onUnmute", this.d);
return true;
} catch (Exception e2) {
af.b(BTBaseView.TAG, e2.getMessage());
return false;
}
}
public void play() {
a aVar;
try {
if (!this.N) {
String d = d();
this.J = d;
this.p.initVFPData(d, this.b.getVideoUrlEncode(), this.D);
if (this.H == 1) {
playMute();
} else {
playUnMute();
}
try {
if (this.B != null) {
af.b("omsdk", "bt impressionOccurred");
this.B.impressionOccurred();
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
if (!this.p.playVideo() && (aVar = this.D) != null) {
aVar.onPlayError("play video failed");
}
this.N = true;
return;
}
if (this.G) {
this.p.playVideo(0);
this.G = false;
} else {
this.p.start(false);
}
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.resume();
af.a("omsdk", "btv play2: videoEvents.resume()");
}
} catch (Throwable th2) {
af.a(BTBaseView.TAG, th2.getMessage());
}
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPlay", this.d);
return;
}
return;
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
af.b(BTBaseView.TAG, e.getMessage(), e);
}
public void resume() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
if (this.G) {
playerView.playVideo(0);
this.G = false;
} else {
playerView.onResume();
}
try {
MediaEvents mediaEvents = this.C;
if (mediaEvents != null) {
mediaEvents.resume();
af.a("omsdk", "btv play3: videoEvents.resume()");
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerResume", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage());
}
}
public void pause() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.pause();
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPause", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
}
public void stop() {
try {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.pause();
this.p.stop();
this.G = true;
WebView webView = this.v;
if (webView != null) {
BTBaseView.a(webView, "onPlayerStop", this.d);
}
}
} catch (Exception e) {
af.b(BTBaseView.TAG, e.getMessage(), e);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
try {
if (this.p != null) {
AdSession adSession = this.A;
if (adSession != null) {
adSession.finish();
}
this.p.setOnClickListener(null);
this.p.release();
this.p = null;
e eVar = new e();
eVar.a(IronSourceConstants.EVENTS_DURATION, Long.valueOf(System.currentTimeMillis() - Q));
com.mbridge.msdk.foundation.same.report.d.d.a().a("2000146", this.b, eVar);
}
SoundImageView soundImageView = this.q;
if (soundImageView != null) {
soundImageView.setOnClickListener(null);
}
View view = this.s;
if (view != null) {
view.setOnClickListener(null);
}
if (this.v != null) {
this.v = null;
}
if (this.A != null) {
this.A = null;
}
if (this.C != null) {
this.C = null;
}
setOnClickListener(null);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
private boolean c() {
try {
this.p = (PlayerView) findViewById(findID("mbridge_vfpv"));
this.q = (SoundImageView) findViewById(findID("mbridge_sound_switch"));
this.r = (TextView) findViewById(findID("mbridge_tv_count"));
this.s = findViewById(findID("mbridge_rl_playing_close"));
this.O = (RelativeLayout) findViewById(findID("mbridge_top_control"));
this.P = (ProgressBar) findViewById(findID("mbridge_video_progress_bar"));
this.p.setIsBTVideo(true);
this.t = (FeedBackButton) findViewById(findID("mbridge_native_endcard_feed_btn"));
this.u = (ImageView) findViewById(findID("mbridge_iv_link"));
return isNotNULL(this.p, this.q, this.r, this.s);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return false;
}
}
private String d() {
String str = "";
try {
str = this.b.getVideoUrlEncode();
com.mbridge.msdk.videocommon.download.a aVar = this.w;
if (aVar == null) {
return str;
}
String h = aVar.h();
return !ap.a(h) ? new File(h).exists() ? h : str : str;
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage(), th);
return str;
}
}
private int e() {
try {
com.mbridge.msdk.videocommon.d.a b = com.mbridge.msdk.videocommon.d.b.a().b();
if (b == null) {
com.mbridge.msdk.videocommon.d.b.a().c();
}
r0 = b != null ? (int) b.h() : 5;
af.c(BTBaseView.TAG, "MBridgeBaseView buffetTimeout:" + r0);
} catch (Throwable th) {
th.printStackTrace();
}
return r0;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public final void a() {
super.a();
if (this.h) {
this.q.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
boolean isSilent = MBridgeBTVideoView.this.p.isSilent();
if (MBridgeBTVideoView.this.v != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTVideoView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put(CampaignEx.JSON_NATIVE_VIDEO_MUTE, MBridgeBTVideoView.this.E);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTVideoView.this.v, "onPlayerMuteBtnClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
af.a("OperateViews", "onPlayerMuteBtnClicked isMute = " + isSilent + " mute = " + MBridgeBTVideoView.this.E);
} catch (Exception e) {
d.c().a(MBridgeBTVideoView.this.v, e.getMessage());
}
}
}
});
this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTVideoView.this.v != null) {
BTBaseView.a(MBridgeBTVideoView.this.v, "onPlayerCloseBtnClicked", MBridgeBTVideoView.this.d);
}
}
});
setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTVideoView.this.C != null) {
try {
MBridgeBTVideoView.this.C.adUserInteraction(InteractionType.CLICK);
af.a("omsdk", "btv adUserInteraction click");
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
if (MBridgeBTVideoView.this.v != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTVideoView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(view.getX()));
jSONObject2.put("y", String.valueOf(view.getY()));
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTVideoView.this.v, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(MBridgeBTVideoView.this.v, "onClicked", MBridgeBTVideoView.this.d);
}
}
}
});
}
}
public static final class a extends DefaultVideoPlayerStatusListener {
private MBridgeBTVideoView a;
private WebView b;
private MediaEvents c;
private String d;
private String e;
private int f;
private int g;
private boolean h;
private int l;
private int m;
private boolean i = false;
private boolean j = false;
private boolean k = false;
private boolean n = false;
private boolean o = false;
public a(MBridgeBTVideoView mBridgeBTVideoView, WebView webView, MediaEvents mediaEvents) {
this.a = mBridgeBTVideoView;
this.b = webView;
this.c = mediaEvents;
if (mBridgeBTVideoView != null) {
this.d = mBridgeBTVideoView.d;
this.e = mBridgeBTVideoView.c;
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayStarted(int i) {
super.onPlayStarted(i);
if (!this.h) {
this.a.P.setMax(i);
WebView webView = this.b;
if (webView != null) {
BTBaseView.a(webView, "onPlayerPlay", this.d);
}
this.h = true;
if (this.c != null) {
try {
MBridgeBTVideoView mBridgeBTVideoView = this.a;
this.c.start(i, (mBridgeBTVideoView == null || mBridgeBTVideoView.p == null) ? 0.0f : this.a.p.getVolume());
af.a("omsdk", "play2: videoEvents.start()");
} catch (Exception e) {
af.b("omsdk", e.getMessage());
}
}
}
boolean unused = MBridgeBTVideoView.K = false;
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayCompleted() {
super.onPlayCompleted();
MBridgeBTVideoView mBridgeBTVideoView = this.a;
CampaignEx campaignEx = mBridgeBTVideoView.b;
if (campaignEx == null) {
mBridgeBTVideoView.r.setText("0");
} else if (campaignEx.getVideoCompleteTime() > 0) {
this.a.r.setText(x.a(c.m().c(), "mbridge_reward_video_view_reward_time_complete", "string"));
} else {
this.a.r.setText("0");
}
this.a.p.setClickable(false);
WebView webView = this.b;
if (webView != null) {
BTBaseView.a(webView, "onPlayerFinish", this.d);
}
MediaEvents mediaEvents = this.c;
if (mediaEvents != null) {
mediaEvents.complete();
af.a("omsdk", "play: videoEvents.complete()");
}
this.f = this.g;
boolean unused = MBridgeBTVideoView.K = true;
this.a.stop();
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlayError(String str) {
super.onPlayError(str);
if (this.b != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.o);
jSONObject.put("id", this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("error", str);
jSONObject2.put("id", this.d);
jSONObject.put("data", jSONObject2);
g.a().a(this.b, "onPlayerFailed", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(this.b, e.getMessage());
}
}
}
/* JADX WARN: Removed duplicated region for block: B:90:0x02c7 A[Catch: Exception -> 0x028f, TRY_LEAVE, TryCatch #0 {Exception -> 0x028f, blocks: (B:70:0x0239, B:72:0x023d, B:78:0x0245, B:80:0x0249, B:82:0x024d, B:84:0x0259, B:87:0x0264, B:88:0x02bb, B:90:0x02c7, B:94:0x0291), top: B:69:0x0239 }] */
/* JADX WARN: Removed duplicated region for block: B:93:? A[RETURN, SYNTHETIC] */
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void onPlayProgress(int r11, int r12) {
/*
Method dump skipped, instructions count: 750
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.onPlayProgress(int, int):void");
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onBufferingStart(String str) {
try {
af.b("omsdk", "bt onBufferingStart1");
super.onBufferingStart(str);
if (this.c != null) {
af.b("omsdk", "bt onBufferingStart");
this.c.bufferStart();
this.o = true;
}
if ((str.equals(PlayerErrorConstant.PREPARE_TIMEOUT) || str.equals(PlayerErrorConstant.PLAYERING_TIMEOUT)) && this.b != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", this.d);
jSONObject.put("data", new JSONObject());
g.a().a(this.b, "onPlayerTimeout", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(this.b, e.getMessage());
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onBufferingEnd() {
try {
super.onBufferingEnd();
if (this.c == null || !this.o) {
return;
}
af.b("omsdk", "bt onBufferingEnd");
this.o = false;
this.c.bufferFinish();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override // com.mbridge.msdk.playercommon.DefaultVideoPlayerStatusListener, com.mbridge.msdk.playercommon.VideoPlayerStatusListener
public final void onPlaySetDataSourceError(String str) {
super.onPlaySetDataSourceError(str);
}
/* JADX WARN: Removed duplicated region for block: B:23:0x00a7 A[Catch: Exception -> 0x006f, TryCatch #0 {Exception -> 0x006f, blocks: (B:15:0x002f, B:17:0x0037, B:20:0x0044, B:21:0x009b, B:23:0x00a7, B:25:0x00b1, B:31:0x0071), top: B:14:0x002f }] */
/* JADX WARN: Removed duplicated region for block: B:30:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(int r3, int r4) {
/*
r2 = this;
java.lang.String r0 = "DefaultVideoPlayerStatusListener"
r2.l = r3
r2.m = r4
com.mbridge.msdk.foundation.tools.ah r3 = com.mbridge.msdk.foundation.tools.ah.a()
java.lang.String r4 = "h_c_r_w_p_c"
r1 = 0
boolean r3 = r3.a(r4, r1)
if (r3 != 0) goto L15
goto Lc2
L15:
int r3 = r2.l
r4 = 100
if (r3 == r4) goto Lc2
int r4 = r2.m
if (r4 != 0) goto Lc2
boolean r4 = r2.n
if (r4 != 0) goto Lc2
if (r3 == 0) goto Lc2
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a
if (r3 == 0) goto Lc2
com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b
if (r3 != 0) goto L2f
goto Lc2
L2f:
int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f
r4 = 94
if (r3 == r4) goto L71
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r3 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r3 = r3.b // Catch: java.lang.Exception -> L6f
int r3 = r3.getAdType() // Catch: java.lang.Exception -> L6f
r4 = 287(0x11f, float:4.02E-43)
if (r3 != r4) goto L44
goto L71
L44:
java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f
r3.<init>() // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getBidToken() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f
goto L9b
L6f:
r3 = move-exception
goto Lb7
L71:
java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch: java.lang.Exception -> L6f
r3.<init>() // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getRequestId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getId() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.video.bt.module.MBridgeBTVideoView r4 = r2.a // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.foundation.entity.CampaignEx r4 = r4.b // Catch: java.lang.Exception -> L6f
java.lang.String r4 = r4.getVideoUrlEncode() // Catch: java.lang.Exception -> L6f
r3.append(r4) // Catch: java.lang.Exception -> L6f
java.lang.String r3 = r3.toString() // Catch: java.lang.Exception -> L6f
L9b:
com.mbridge.msdk.videocommon.download.b r4 = com.mbridge.msdk.videocommon.download.b.getInstance() // Catch: java.lang.Exception -> L6f
java.lang.String r1 = r2.e // Catch: java.lang.Exception -> L6f
com.mbridge.msdk.videocommon.download.a r3 = r4.a(r1, r3) // Catch: java.lang.Exception -> L6f
if (r3 == 0) goto Lc2
r3.p() // Catch: java.lang.Exception -> L6f
r3 = 1
r2.n = r3 // Catch: java.lang.Exception -> L6f
boolean r3 = com.mbridge.msdk.MBridgeConstans.DEBUG // Catch: java.lang.Exception -> L6f
if (r3 == 0) goto Lc2
java.lang.String r3 = "CDRate is : 0 and start download when player create!"
com.mbridge.msdk.foundation.tools.af.b(r0, r3) // Catch: java.lang.Exception -> L6f
goto Lc2
Lb7:
boolean r4 = com.mbridge.msdk.MBridgeConstans.DEBUG
if (r4 == 0) goto Lc2
java.lang.String r3 = r3.getMessage()
com.mbridge.msdk.foundation.tools.af.b(r0, r3)
Lc2:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.MBridgeBTVideoView.a.a(int, int):void");
}
}
public void setSoundImageViewVisble(int i) {
this.q.setVisibility(i == 0 ? 4 : 0);
}
public void setCountDownTextViewVisable(int i) {
this.r.setVisibility(i == 0 ? 4 : 0);
}
public void setCloseViewVisable(int i) {
this.s.setVisibility(i == 0 ? 4 : 0);
}
public void setProgressBarState(int i) {
ProgressBar progressBar = this.P;
if (progressBar != null) {
progressBar.setVisibility(i == 0 ? 8 : 0);
CampaignEx campaignEx = this.b;
if (campaignEx == null || campaignEx.getProgressBarShow() != 1) {
return;
}
this.P.setVisibility(0);
}
}
/* JADX INFO: Access modifiers changed from: private */
public static String b(int i, int i2) {
if (i2 != 0) {
try {
return ak.a(Double.valueOf(i / i2)) + "";
} catch (Throwable th) {
th.printStackTrace();
}
}
return i2 + "";
}
public void setVolume(float f, float f2) {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setVolume(f, f2);
}
}
public void setPlaybackParams(float f) {
PlayerView playerView = this.p;
if (playerView != null) {
playerView.setPlaybackParams(f);
}
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
if (i <= 0) {
i = this.O.getPaddingLeft();
}
if (i2 <= 0) {
i2 = this.O.getPaddingRight();
}
if (i3 <= 0) {
i3 = this.O.getPaddingTop();
}
if (i4 <= 0) {
i4 = this.O.getPaddingBottom();
}
af.b(BTBaseView.TAG, "NOTCH BTVideoView " + String.format("%1s-%2s-%3s-%4s", Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf(i3), Integer.valueOf(i4)));
this.O.setPadding(i, i3, i2, i4);
}
public void preLoadData() {
String str;
int r;
if (this.b.getAdType() == 94 || this.b.getAdType() == 287) {
str = this.b.getRequestId() + this.b.getId() + this.b.getVideoUrlEncode();
} else {
str = this.b.getId() + this.b.getVideoUrlEncode() + this.b.getBidToken();
}
com.mbridge.msdk.videocommon.download.a a2 = com.mbridge.msdk.videocommon.download.b.getInstance().a(this.c, str);
if (a2 != null) {
this.w = a2;
}
this.F = e();
String d = d();
this.J = d;
if (this.h && !TextUtils.isEmpty(d) && this.b != null) {
AdSession adSession = this.A;
if (adSession != null) {
adSession.registerAdView(this.p);
AdSession adSession2 = this.A;
SoundImageView soundImageView = this.q;
FriendlyObstructionPurpose friendlyObstructionPurpose = FriendlyObstructionPurpose.OTHER;
adSession2.addFriendlyObstruction(soundImageView, friendlyObstructionPurpose, null);
this.A.addFriendlyObstruction(this.r, friendlyObstructionPurpose, null);
this.A.addFriendlyObstruction(this.s, FriendlyObstructionPurpose.VIDEO_CONTROLS, null);
}
a aVar = new a(this, this.v, this.C);
this.D = aVar;
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
if (campaignEx.getReady_rate() != -1) {
r = campaignEx.getReady_rate();
} else {
r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r();
}
} else {
r = com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).r();
}
aVar.a(r, com.mbridge.msdk.videocommon.d.b.a().a(c.m().k(), this.c, false).s());
this.p.setDesk(false);
this.p.initBufferIngParam(this.F);
soundOperate(this.E, -1, null);
}
K = false;
}
}

View File

@@ -0,0 +1,519 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.content.res.Configuration;
import android.net.http.SslError;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.mbridge.msdk.e.b;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.h;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.mbsignalcommon.b.a;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.out.Campaign;
import com.mbridge.msdk.video.bt.a.d;
import com.mbridge.msdk.video.signal.a.k;
import com.mbridge.msdk.videocommon.d.c;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBridgeBTWebView extends MBridgeBTWebViewDiff {
private String p;
private String q;
private String r;
private boolean s;
private ImageView t;
private boolean u;
private c v;
private List<CampaignEx> w;
private WebView x;
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void expand(String str, boolean z) {
}
public List<CampaignEx> getCampaigns() {
return this.w;
}
public String getFilePath() {
return this.q;
}
public String getFileURL() {
return this.p;
}
public String getHtml() {
return this.r;
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public CampaignEx getMraidCampaign() {
return this.b;
}
public c getRewardUnitSetting() {
return this.v;
}
public WindVaneWebView getWebView() {
return this.webView;
}
public void setCampaigns(List<CampaignEx> list) {
this.w = list;
}
public void setCreateWebView(WebView webView) {
this.x = webView;
}
public void setFilePath(String str) {
this.q = str;
}
public void setHtml(String str) {
this.r = str;
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void setRewardUnitSetting(c cVar) {
this.v = cVar;
}
public void setFileURL(String str) {
this.p = str;
if (TextUtils.isEmpty(str)) {
return;
}
boolean contains = str.contains("play.google.com");
setWebviewClickable(!contains);
if (contains) {
com.mbridge.msdk.mbsignalcommon.base.c cVar = new com.mbridge.msdk.mbsignalcommon.base.c();
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setFilter(cVar);
}
}
}
public MBridgeBTWebView(Context context) {
super(context);
this.s = false;
this.u = false;
}
public MBridgeBTWebView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.s = false;
this.u = false;
}
public void setWebviewClickable(boolean z) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setClickable(z);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void init(Context context) {
WindVaneWebView windVaneWebView = new WindVaneWebView(context);
this.webView = windVaneWebView;
windVaneWebView.setBackgroundColor(0);
this.webView.setVisibility(0);
k kVar = new k(null, this.b, this.w);
this.jsCommon = kVar;
kVar.a(this.c);
if (b.a()) {
setChinaAlertInstallState(this.jsCommon);
}
this.webView.setObject(this.jsCommon);
this.webView.setMraidObject(this);
this.webView.setWebViewListener(new a() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.1
@Override // com.mbridge.msdk.mbsignalcommon.b.a
public final void a(Object obj) {
super.a(obj);
try {
k kVar2 = MBridgeBTWebView.this.jsCommon;
String str = "";
String c = kVar2 != null ? kVar2.c() : "";
if (!TextUtils.isEmpty(c)) {
str = Base64.encodeToString(c.getBytes(), 2);
af.a("RVWindVaneWebView", "getEndScreenInfo success");
} else {
af.a("RVWindVaneWebView", "getEndScreenInfo failed");
}
g.a().a(obj, str);
} catch (Throwable th) {
af.a("RVWindVaneWebView", th.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, String str) {
super.a(webView, str);
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 1);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onWebviewLoad", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
g.a().a(MBridgeBTWebView.this.webView);
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i, String str, String str2) {
super.a(webView, i, str, str2);
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 2);
jSONObject2.put("error", str);
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onWebviewLoad", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
super.a(webView, sslErrorHandler, sslError);
if (MBridgeBTWebView.this.x == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("id", MBridgeBTWebView.this.d);
jSONObject.put("code", BTBaseView.n);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("id", MBridgeBTWebView.this.d);
jSONObject2.put("result", 2);
throw null;
} catch (Exception e) {
d.c().a(MBridgeBTWebView.this.x, e.getMessage());
af.a("RVWindVaneWebView", e.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.b.a, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, int i) {
super.a(webView, i);
}
});
addView(this.webView, new FrameLayout.LayoutParams(-1, -1));
setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.2
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
if (MBridgeBTWebView.this.x != null) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", BTBaseView.n);
jSONObject.put("id", MBridgeBTWebView.this.d);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("x", String.valueOf(view.getX()));
jSONObject2.put("y", String.valueOf(view.getY()));
jSONObject.put("data", jSONObject2);
g.a().a(MBridgeBTWebView.this.x, "onClicked", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a(MBridgeBTWebView.this.x, "onClicked", MBridgeBTWebView.this.d);
}
}
}
});
try {
ImageView imageView = new ImageView(getContext());
this.t = imageView;
imageView.setImageResource(findDrawable("mbridge_reward_close"));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(96, 96);
layoutParams.gravity = 8388661;
layoutParams.setMargins(30, 30, 30, 30);
this.t.setLayoutParams(layoutParams);
this.t.setVisibility(this.s ? 4 : 8);
CampaignEx campaignEx = this.b;
if (campaignEx != null && campaignEx.isMraid()) {
this.t.setVisibility(4);
}
this.t.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.3
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBridgeBTWebView.this.close();
}
});
addView(this.t);
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
public void setWebViewRid(String str) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setRid(str);
}
}
public void setWebViewLocalRequestId(String str) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setLocalRequestId(str);
}
}
public void setTempTypeForMetrics(int i) {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setTempTypeForMetrics(i);
}
}
public void preload() {
if (!TextUtils.isEmpty(this.p)) {
this.webView.loadUrl(this.p);
} else if (!TextUtils.isEmpty(this.q)) {
this.webView.loadUrl(this.q);
} else {
if (TextUtils.isEmpty(this.r)) {
return;
}
this.webView.loadDataWithBaseURL("", this.r, "text/html", "UTF-8", null);
}
}
public void webviewLoad(int i) {
if (this.jsCommon == null) {
this.jsCommon = new k(null, this.b, this.w);
}
CampaignEx campaignEx = this.b;
if (campaignEx != null) {
this.jsCommon.a(campaignEx);
} else {
List<CampaignEx> list = this.w;
if (list != null && list.size() > 0) {
this.jsCommon.a(this.w);
if (this.w.size() == 1) {
this.jsCommon.a(this.w.get(0));
}
}
}
c cVar = this.v;
if (cVar != null) {
this.jsCommon.a(cVar);
}
this.jsCommon.a(this.c);
this.jsCommon.c(this.d);
if (b.a()) {
setChinaAlertInstallState(this.jsCommon);
}
if (i == 1) {
this.jsCommon.q();
}
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView != null) {
windVaneWebView.setObject(this.jsCommon);
}
CampaignEx campaignEx2 = this.b;
if (campaignEx2 != null && campaignEx2.isMraid()) {
this.t.setVisibility(4);
}
preload();
}
public boolean webviewReload() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null) {
return false;
}
windVaneWebView.reload();
return true;
}
public boolean webviewGoBack() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null || !windVaneWebView.canGoBack()) {
return false;
}
this.webView.goBack();
return true;
}
public boolean webviewGoForward() {
WindVaneWebView windVaneWebView = this.webView;
if (windVaneWebView == null || !windVaneWebView.canGoForward()) {
return false;
}
this.webView.goForward();
return true;
}
public void broadcast(String str, JSONObject jSONObject) {
if (this.webView != null) {
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", BTBaseView.n);
jSONObject2.put("id", this.d);
jSONObject2.put("eventName", str);
jSONObject2.put("data", jSONObject);
g.a().a((WebView) this.webView, "broadcast", Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception unused) {
d.c().a((WebView) this.webView, "broadcast", this.d);
}
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView, android.view.View
public void onConfigurationChanged(Configuration configuration) {
if (this.webView != null) {
try {
JSONObject jSONObject = new JSONObject();
if (configuration.orientation == 2) {
jSONObject.put("orientation", "landscape");
} else {
jSONObject.put("orientation", "portrait");
}
jSONObject.put("instanceId", this.d);
g.a().a((WebView) this.webView, "orientation", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
}
public void onBackPressed() {
if (this.webView != null) {
d.c().a((WebView) this.webView, "onSystemBackPressed", this.d);
}
}
@Override // com.mbridge.msdk.video.bt.module.BTBaseView
public void onDestory() {
if (this.u) {
return;
}
this.u = true;
try {
if (this.webView != null) {
d.c().a((WebView) this.webView, "onSystemDestory", this.d);
}
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { // from class: com.mbridge.msdk.video.bt.module.MBridgeBTWebView.4
@Override // java.lang.Runnable
public final void run() {
try {
WindVaneWebView windVaneWebView = MBridgeBTWebView.this.webView;
if (windVaneWebView != null) {
windVaneWebView.clearWebView();
MBridgeBTWebView.this.webView.release();
}
MBridgeBTWebView.this.p = null;
MBridgeBTWebView.this.q = null;
MBridgeBTWebView.this.r = null;
if (MBridgeBTWebView.this.x != null) {
MBridgeBTWebView.this.x = null;
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
}, 500L);
setOnClickListener(null);
removeAllViews();
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTWebViewDiff, com.mbridge.msdk.mbsignalcommon.mraid.b
public void open(String str) {
try {
String clickURL = this.b.getClickURL();
if (!TextUtils.isEmpty(str)) {
this.b.setClickURL(str);
reportOpen(str);
}
com.mbridge.msdk.click.a aVar = new com.mbridge.msdk.click.a(getContext(), this.c);
aVar.a(this);
aVar.a(this.b);
this.b.setClickURL(clickURL);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.video.bt.module.MBridgeBTWebViewDiff
public void reportOpen(String str) {
try {
CampaignEx mraidCampaign = getMraidCampaign();
if (mraidCampaign != null) {
new h(getContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.c, str, this.b.isBidCampaign());
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void close() {
WebView webView = this.x;
if (webView != null) {
BTBaseView.a(webView, "onPlayerCloseBtnClicked", this.d);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void useCustomClose(boolean z) {
try {
this.t.setVisibility(z ? 4 : 0);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onStartRedirection(Campaign campaign, String str) {
aj.b(campaign, this);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onFinishRedirection(Campaign campaign, String str) {
aj.a(campaign, this);
}
@Override // com.mbridge.msdk.out.BaseTrackingListener
public void onRedirectionFailed(Campaign campaign, String str) {
aj.a(campaign, this);
}
}

View File

@@ -0,0 +1,57 @@
package com.mbridge.msdk.video.bt.module;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import com.mbridge.msdk.click.a;
import com.mbridge.msdk.click.i;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.report.h;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.mraid.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.video.signal.a.k;
/* loaded from: classes4.dex */
public abstract class MBridgeBTWebViewDiff extends BTBaseView implements i, b {
public k jsCommon;
public WindVaneWebView webView;
public void setChinaAlertInstallState(k kVar) {
}
public MBridgeBTWebViewDiff(Context context) {
super(context);
}
public MBridgeBTWebViewDiff(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public void open(String str) {
try {
String clickURL = this.b.getClickURL();
if (!TextUtils.isEmpty(str)) {
this.b.setClickURL(str);
reportOpen(str);
}
a aVar = new a(getContext(), this.c);
aVar.a(this);
aVar.a(this.b);
this.b.setClickURL(clickURL);
} catch (Throwable th) {
af.b(BTBaseView.TAG, th.getMessage());
}
}
public void reportOpen(String str) {
try {
CampaignEx mraidCampaign = getMraidCampaign();
if (mraidCampaign != null) {
new h(getContext()).a(mraidCampaign.getRequestId(), mraidCampaign.getRequestIdNotice(), mraidCampaign.getId(), this.c, str, this.b.isBidCampaign());
}
} catch (Throwable th) {
af.a(BTBaseView.TAG, th.getMessage());
}
}
}

View File

@@ -0,0 +1,22 @@
package com.mbridge.msdk.video.bt.module.a;
import com.mbridge.msdk.videocommon.b.c;
/* loaded from: classes4.dex */
public interface a {
void a();
void a(int i, String str, String str2);
void a(String str);
void a(String str, String str2);
void a(boolean z, int i);
void a(boolean z, c cVar);
void a(boolean z, String str, String str2);
void b(String str, String str2);
}

View File

@@ -0,0 +1,22 @@
package com.mbridge.msdk.video.bt.module.a;
import com.mbridge.msdk.videocommon.b.c;
/* loaded from: classes4.dex */
public interface b {
void a(String str);
void a(String str, int i, String str2, String str3);
void a(String str, String str2);
void a(String str, String str2, String str3);
void a(String str, boolean z, c cVar);
void a(boolean z, int i);
void b(String str, String str2, String str3);
void c(String str, String str2, String str3);
}

View File

@@ -0,0 +1,99 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.RewardInfo;
import com.mbridge.msdk.videocommon.listener.InterVideoOutListener;
/* loaded from: classes4.dex */
public final class a implements InterVideoOutListener {
private g a;
private String b;
private boolean c;
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdCloseWithIVReward(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
}
public a(g gVar, String str, boolean z) {
this.a = gVar;
this.b = str;
this.c = z;
}
public a(g gVar) {
this.b = "";
this.a = gVar;
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdShow(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onAdShow(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onAdClose(MBridgeIds mBridgeIds, RewardInfo rewardInfo) {
g gVar = this.a;
if (gVar != null) {
gVar.onAdClose(mBridgeIds, rewardInfo);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onShowFail(com.mbridge.msdk.foundation.same.report.d.c cVar, MBridgeIds mBridgeIds, String str) {
g gVar = this.a;
if (gVar != null) {
gVar.onShowFail(mBridgeIds, str);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoAdClicked(boolean z, MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoAdClicked(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoComplete(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoComplete(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onEndcardShow(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onEndcardShow(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoLoadFail(MBridgeIds mBridgeIds, String str) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoLoadFail(mBridgeIds, str);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onVideoLoadSuccess(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onVideoLoadSuccess(mBridgeIds);
}
}
@Override // com.mbridge.msdk.videocommon.listener.InterVideoOutListener
public final void onLoadSuccess(MBridgeIds mBridgeIds) {
g gVar = this.a;
if (gVar != null) {
gVar.onLoadSuccess(mBridgeIds);
}
}
}

View File

@@ -0,0 +1,51 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public class b implements h {
public boolean b = false;
public boolean c = false;
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
af.a("ShowRewardListener", "onAdShow");
this.b = true;
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
af.a("ShowRewardListener", "onAdClose:isCompleteView:" + z + ",reward:" + cVar2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
af.a("ShowRewardListener", "onShowFail:" + str);
this.c = true;
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(boolean z, String str, String str2) {
af.a("ShowRewardListener", "onVideoAdClicked:" + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(String str, String str2) {
af.a("ShowRewardListener", "onVideoComplete: " + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(boolean z, int i) {
af.a("ShowRewardListener", "onAdCloseWithIVReward: " + z + " " + i);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void b(String str, String str2) {
af.a("ShowRewardListener", "onEndcardShow: " + str2);
}
@Override // com.mbridge.msdk.video.bt.module.b.h
public void a(int i, String str, String str2) {
af.a("ShowRewardListener", "onAutoLoad: " + str2);
}
}

View File

@@ -0,0 +1,70 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.foundation.tools.af;
/* loaded from: classes4.dex */
public final class c extends b {
private com.mbridge.msdk.video.bt.module.a.b a;
private String d;
public c(com.mbridge.msdk.video.bt.module.a.b bVar, String str) {
this.a = bVar;
this.d = str;
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAdShow");
this.a.a(this.d);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAdClose");
this.a.a(this.d, z, cVar2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onShowFail");
this.a.a(this.d, str);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onVideoAdClicked");
this.a.a(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onVideoComplete");
this.a.b(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void b(String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onEndcardShow");
this.a.c(this.d, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(int i, String str, String str2) {
if (this.a != null) {
af.a("H5ShowRewardListener", "onAutoLoad");
this.a.a(this.d, i, str, str2);
}
}
}

View File

@@ -0,0 +1,159 @@
package com.mbridge.msdk.video.bt.module.b;
import android.content.Context;
/* loaded from: classes4.dex */
public final class d extends b {
private h a;
private com.mbridge.msdk.videocommon.d.c d;
private String e;
private String f;
private boolean g;
private Context h;
private boolean i = false;
private boolean j = false;
private boolean k = false;
/* JADX WARN: Removed duplicated region for block: B:12:0x004c A[Catch: Exception -> 0x0070, TryCatch #0 {Exception -> 0x0070, blocks: (B:3:0x0016, B:5:0x0026, B:7:0x0030, B:9:0x0039, B:10:0x0042, B:12:0x004c, B:14:0x0052, B:16:0x0058, B:18:0x0062, B:21:0x0066, B:23:0x006a), top: B:2:0x0016 }] */
/* JADX WARN: Removed duplicated region for block: B:14:0x0052 A[Catch: Exception -> 0x0070, TryCatch #0 {Exception -> 0x0070, blocks: (B:3:0x0016, B:5:0x0026, B:7:0x0030, B:9:0x0039, B:10:0x0042, B:12:0x004c, B:14:0x0052, B:16:0x0058, B:18:0x0062, B:21:0x0066, B:23:0x006a), top: B:2:0x0016 }] */
/* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public d(android.content.Context r4, boolean r5, com.mbridge.msdk.videocommon.d.c r6, com.mbridge.msdk.foundation.entity.CampaignEx r7, com.mbridge.msdk.video.bt.module.b.h r8, java.lang.String r9, java.lang.String r10) {
/*
r3 = this;
r3.<init>()
r0 = 0
r3.i = r0
r3.j = r0
r3.k = r0
r3.a = r8
r3.d = r6
r3.e = r10
r3.f = r9
r3.g = r5
r3.h = r4
com.mbridge.msdk.foundation.controller.c r4 = com.mbridge.msdk.foundation.controller.c.m() // Catch: java.lang.Exception -> L70
java.lang.String r4 = r4.k() // Catch: java.lang.Exception -> L70
boolean r5 = android.text.TextUtils.isEmpty(r4) // Catch: java.lang.Exception -> L70
r8 = 0
if (r5 != 0) goto L41
com.mbridge.msdk.c.h r5 = com.mbridge.msdk.c.h.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.c.g r4 = r5.b(r4) // Catch: java.lang.Exception -> L70
if (r4 != 0) goto L37
com.mbridge.msdk.c.h.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.c.g r4 = com.mbridge.msdk.c.i.a() // Catch: java.lang.Exception -> L70
L37:
if (r4 == 0) goto L41
long r4 = r4.ad() // Catch: java.lang.Exception -> L70
r1 = 1000(0x3e8, double:4.94E-321)
long r4 = r4 * r1
goto L42
L41:
r4 = r8
L42:
com.mbridge.msdk.videocommon.d.b r10 = com.mbridge.msdk.videocommon.d.b.a() // Catch: java.lang.Exception -> L70
com.mbridge.msdk.videocommon.d.a r10 = r10.b() // Catch: java.lang.Exception -> L70
if (r10 == 0) goto L50
long r8 = r10.f() // Catch: java.lang.Exception -> L70
L50:
if (r7 == 0) goto L70
boolean r4 = r7.isSpareOffer(r8, r4) // Catch: java.lang.Exception -> L70
if (r4 == 0) goto L6a
r4 = 1
r7.setSpareOfferFlag(r4) // Catch: java.lang.Exception -> L70
int r5 = r6.y() // Catch: java.lang.Exception -> L70
if (r5 != r4) goto L66
r7.setCbt(r4) // Catch: java.lang.Exception -> L70
goto L70
L66:
r7.setCbt(r0) // Catch: java.lang.Exception -> L70
goto L70
L6a:
r7.setSpareOfferFlag(r0) // Catch: java.lang.Exception -> L70
r7.setCbt(r0) // Catch: java.lang.Exception -> L70
L70:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.bt.module.b.d.<init>(android.content.Context, boolean, com.mbridge.msdk.videocommon.d.c, com.mbridge.msdk.foundation.entity.CampaignEx, com.mbridge.msdk.video.bt.module.b.h, java.lang.String, java.lang.String):void");
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar) {
super.a(cVar);
h hVar = this.a;
if (hVar == null || this.i) {
return;
}
this.i = true;
this.b = true;
hVar.a(cVar);
this.a.a(2, this.f, this.e);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2) {
super.a(cVar, z, cVar2);
h hVar = this.a;
if (hVar == null || this.k) {
return;
}
this.k = true;
hVar.a(7, this.f, this.e);
this.a.a(cVar, z, cVar2);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, int i) {
super.a(z, i);
h hVar = this.a;
if (hVar == null || this.k) {
return;
}
hVar.a(z, i);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str) {
super.a(cVar, str);
h hVar = this.a;
if (hVar == null || this.j) {
return;
}
this.j = true;
this.c = true;
hVar.a(cVar, str);
this.a.a(4, this.f, this.e);
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(boolean z, String str, String str2) {
super.a(z, str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.a(z, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void b(String str, String str2) {
super.b(str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.b(str, str2);
this.a.a(6, str, str2);
}
}
@Override // com.mbridge.msdk.video.bt.module.b.b, com.mbridge.msdk.video.bt.module.b.h
public final void a(String str, String str2) {
super.a(str, str2);
h hVar = this.a;
if (hVar != null) {
hVar.a(str, str2);
this.a.a(5, str, str2);
}
}
}

View File

@@ -0,0 +1,23 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.video.bt.module.MBTempContainer;
/* loaded from: classes4.dex */
public final class e extends MBTempContainer.a.C0237a {
private h a;
private com.mbridge.msdk.foundation.same.report.d.c b;
public e(com.mbridge.msdk.foundation.same.report.d.c cVar, h hVar) {
this.a = hVar;
this.b = cVar;
}
@Override // com.mbridge.msdk.video.bt.module.MBTempContainer.a.C0237a, com.mbridge.msdk.video.bt.module.MBTempContainer.a
public final void a(String str) {
super.a(str);
h hVar = this.a;
if (hVar != null) {
hVar.a(this.b, str);
}
}
}

View File

@@ -0,0 +1,198 @@
package com.mbridge.msdk.video.bt.module.b;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.db.o;
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.mbbid.common.BidResponsedEx;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class f {
private static final String a = "com.mbridge.msdk.video.bt.module.b.f";
public static void a(Context context, String str) {
if (context != null) {
try {
o a2 = o.a(com.mbridge.msdk.foundation.db.g.a(context));
if (TextUtils.isEmpty(str) || a2 == null || a2.a() <= 0) {
return;
}
List<n> a3 = a2.a("m_download_end");
List<n> a4 = a2.a("2000021");
List<n> a5 = a2.a("2000039");
List<n> a6 = a2.a("m_download_end");
List<n> a7 = a2.a("m_download_end");
List<n> a8 = a2.a("2000044");
com.mbridge.msdk.foundation.same.report.n.e(a4);
com.mbridge.msdk.foundation.same.report.n.a(a3);
com.mbridge.msdk.foundation.same.report.n.c(a5);
com.mbridge.msdk.foundation.same.report.n.b(a6);
com.mbridge.msdk.foundation.same.report.n.f(a7);
com.mbridge.msdk.foundation.same.report.n.d(a8);
} catch (Exception e) {
af.b(a, e.getMessage());
}
}
}
public static void a(Context context, CampaignEx campaignEx, String str, int i) {
if (context == null || campaignEx == null) {
return;
}
try {
if (TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("reason", "");
jSONObject.put("templateshowtype", i + " offer show success");
jSONObject.put("result", 2);
jSONObject.put("ad_type", campaignEx.getAdType() == 287 ? 3 : 1);
String str2 = campaignEx.getendcard_url();
if (!TextUtils.isEmpty(str2)) {
jSONObject.put("creative", URLEncoder.encode(str2, "UTF-8"));
}
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, CampaignEx campaignEx, String str, String str2, int i) {
if (context == null || campaignEx == null) {
return;
}
try {
if ((!TextUtils.isEmpty(str)) && (!TextUtils.isEmpty(str2))) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("reason", str2);
jSONObject.put("templateshowtype", i);
jSONObject.put("result", 1);
String str3 = campaignEx.getendcard_url();
if (!TextUtils.isEmpty(str3)) {
jSONObject.put("creative", URLEncoder.encode(str3, "UTF-8"));
}
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("ad_type", campaignEx.getAdType() == 287 ? 3 : 1);
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
}
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, List<CampaignEx> list, String str) {
if (context == null || list == null) {
return;
}
try {
if (list.isEmpty() || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.add(list.get(i).getId());
}
jSONObject.put(BidResponsedEx.KEY_CID, arrayList);
jSONObject.put("result", 2);
if (list.get(0) != null) {
CampaignEx campaignEx = list.get(0);
jSONObject.put("reason", "");
jSONObject.put("templateshowtype", "two offer ec show success");
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
}
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(Context context, List<CampaignEx> list, String str, String str2) {
if (context == null || list == null) {
return;
}
try {
if ((!TextUtils.isEmpty(str)) && (!TextUtils.isEmpty(str2))) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000054");
jSONObject.put("network_type", ab.m(context));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.add(list.get(i).getId());
}
jSONObject.put(BidResponsedEx.KEY_CID, arrayList);
jSONObject.put("reason", str2);
jSONObject.put("result", 1);
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
if (list.get(0) != null) {
CampaignEx campaignEx = list.get(0);
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put("templateshowtype", campaignEx.getMof_tplid());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
}
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
}
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
public static void a(CampaignEx campaignEx, String str, int i) {
try {
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
if (c == null || campaignEx == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject();
jSONObject.put("key", "2000115");
jSONObject.put("network_type", ab.m(c));
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str);
jSONObject.put(BidResponsedEx.KEY_CID, campaignEx.getId());
jSONObject.put("play_cur_time", i);
jSONObject.put("reason", "close ad in advance " + campaignEx.getMof_tplid());
jSONObject.put("result", 1);
jSONObject.put("devid", com.mbridge.msdk.foundation.tools.f.c());
jSONObject.put("ad_type", campaignEx.getAdType());
jSONObject.put("rid", campaignEx.getRequestId());
jSONObject.put("rid_n", campaignEx.getRequestIdNotice());
jSONObject.put(CampaignEx.JSON_KEY_NEW_INTERSTITIAL_AD_SPACE_T, campaignEx.getAdSpaceT());
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
}

View File

@@ -0,0 +1,25 @@
package com.mbridge.msdk.video.bt.module.b;
import com.mbridge.msdk.out.MBridgeIds;
import com.mbridge.msdk.out.RewardInfo;
/* loaded from: classes4.dex */
public interface g {
void onAdClose(MBridgeIds mBridgeIds, RewardInfo rewardInfo);
void onAdShow(MBridgeIds mBridgeIds);
void onEndcardShow(MBridgeIds mBridgeIds);
void onLoadSuccess(MBridgeIds mBridgeIds);
void onShowFail(MBridgeIds mBridgeIds, String str);
void onVideoAdClicked(MBridgeIds mBridgeIds);
void onVideoComplete(MBridgeIds mBridgeIds);
void onVideoLoadFail(MBridgeIds mBridgeIds, String str);
void onVideoLoadSuccess(MBridgeIds mBridgeIds);
}

View File

@@ -0,0 +1,20 @@
package com.mbridge.msdk.video.bt.module.b;
/* loaded from: classes4.dex */
public interface h {
void a(int i, String str, String str2);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar, String str);
void a(com.mbridge.msdk.foundation.same.report.d.c cVar, boolean z, com.mbridge.msdk.videocommon.b.c cVar2);
void a(String str, String str2);
void a(boolean z, int i);
void a(boolean z, String str, String str2);
void b(String str, String str2);
}