Files
rr3-apk/decompiled-community/sources/com/mbridge/msdk/video/signal/communication/BaseVideoCommunication.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

1398 lines
57 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.mbridge.msdk.video.signal.communication;
import android.text.TextUtils;
import android.util.Base64;
import androidx.core.app.NotificationCompat;
import com.ironsource.v8;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.i;
import com.mbridge.msdk.click.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.same.b.e;
import com.mbridge.msdk.foundation.tools.FastKV;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.AbsFeedBackForH5;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.video.signal.a.j;
import com.mbridge.msdk.video.signal.a.k;
import com.mbridge.msdk.video.signal.d;
import com.mbridge.msdk.video.signal.factory.IJSFactory;
import com.mbridge.msdk.videocommon.d.b;
import com.unity3d.ads.core.domain.HandleInvocationsFromAdViewer;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class BaseVideoCommunication extends AbsFeedBackForH5 implements IVideoCommunication {
protected IJSFactory a;
private FastKV e = null;
private String a(int i) {
switch (i) {
case 1:
return "sdk_info";
case 2:
return MBridgeConstans.PROPERTIES_UNIT_ID;
case 3:
return "appSetting";
case 4:
return "unitSetting";
case 5:
return "device";
case 6:
return "sdkSetting";
default:
return "";
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void reportData(Object obj, String str) {
}
@Override // com.mbridge.msdk.mbsignalcommon.windvane.h
public void initialize(Object obj, WindVaneWebView windVaneWebView) {
super.initialize(obj, windVaneWebView);
if (obj instanceof IJSFactory) {
this.a = (IJSFactory) obj;
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void init(Object obj, String str) {
af.c("JS-Video-Brigde", v8.a.e);
try {
IJSFactory iJSFactory = this.a;
int i = 1;
if (iJSFactory != null) {
String c = iJSFactory.getJSCommon().c();
if (!TextUtils.isEmpty(c)) {
c = Base64.encodeToString(c.getBytes(), 2);
}
g.a().a(obj, c);
this.a.getJSCommon().b(true);
if (TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("showTransparent");
int optInt2 = jSONObject.optInt(CampaignEx.JSON_NATIVE_VIDEO_MUTE);
int optInt3 = jSONObject.optInt("closeType");
int optInt4 = jSONObject.optInt("orientationType");
int optInt5 = jSONObject.optInt("webfront");
int optInt6 = jSONObject.optInt("showAlertRole");
this.a.getJSCommon().a(optInt == 1);
this.a.getJSCommon().b(optInt2);
this.a.getJSCommon().c(optInt3);
this.a.getJSCommon().d(optInt4);
this.a.getJSCommon().e(optInt5);
d jSCommon = this.a.getJSCommon();
if (optInt6 != 0) {
i = optInt6;
}
jSCommon.h(i);
return;
}
if (obj != null) {
com.mbridge.msdk.mbsignalcommon.windvane.a aVar = (com.mbridge.msdk.mbsignalcommon.windvane.a) obj;
if (aVar.b.getObject() instanceof k) {
k kVar = (k) aVar.b.getObject();
String c2 = kVar.c();
if (!TextUtils.isEmpty(str)) {
JSONObject jSONObject2 = new JSONObject(str);
int optInt7 = jSONObject2.optInt("showTransparent");
int optInt8 = jSONObject2.optInt(CampaignEx.JSON_NATIVE_VIDEO_MUTE);
int optInt9 = jSONObject2.optInt("closeType");
int optInt10 = jSONObject2.optInt("orientationType");
int optInt11 = jSONObject2.optInt("webfront");
int optInt12 = jSONObject2.optInt("showAlertRole");
kVar.a(optInt7 == 1);
kVar.b(optInt8);
kVar.c(optInt9);
kVar.d(optInt10);
kVar.e(optInt11);
if (optInt12 != 0) {
i = optInt12;
}
kVar.h(i);
af.c("JS-Video-Brigde", "init jsCommon.setIsShowingTransparent = " + optInt7);
}
g.a().a(obj, Base64.encodeToString(c2.getBytes(), 2));
}
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "init error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void click(Object obj, String str) {
String str2;
int i;
k kVar;
af.c("JS-Video-Brigde", "click");
try {
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
i = jSONObject.optInt("type");
str2 = jSONObject.optString("pt");
} catch (JSONException e) {
str2 = "";
e.printStackTrace();
i = 1;
}
IJSFactory iJSFactory = this.a;
if (iJSFactory != null) {
iJSFactory.getJSCommon().click(i, str2);
return;
}
if (obj != null) {
com.mbridge.msdk.mbsignalcommon.windvane.a aVar = (com.mbridge.msdk.mbsignalcommon.windvane.a) obj;
if (!(aVar.b.getObject() instanceof k) || (kVar = (k) aVar.b.getObject()) == null) {
return;
}
kVar.click(i, str2);
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "click error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void statistics(Object obj, String str) {
af.c("JS-Video-Brigde", "statistics,params:" + str);
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
this.a.getJSCommon().a(jSONObject.optInt("type"), jSONObject.optString("data"));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "statistics error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void triggerCloseBtn(Object obj, String str) {
af.c("JS-Video-Brigde", "triggerCloseBtn");
try {
if (this.a == null || TextUtils.isEmpty(str) || !new JSONObject(str).optString("state").equals("click")) {
return;
}
this.a.getJSVideoModule().closeVideoOperate(1, -1);
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "triggerCloseBtn error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void showVideoLocation(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("margin_top", 0);
int optInt2 = jSONObject.optInt("margin_left", 0);
int optInt3 = jSONObject.optInt("view_width", 0);
int optInt4 = jSONObject.optInt("view_height", 0);
int optInt5 = jSONObject.optInt("radius", 0);
int optInt6 = jSONObject.optInt("border_top", 0);
int optInt7 = jSONObject.optInt("border_left", 0);
int optInt8 = jSONObject.optInt("border_width", 0);
int optInt9 = jSONObject.optInt("border_height", 0);
af.c("JS-Video-Brigde", "showVideoLocation,margin_top:" + optInt + ",marginLeft:" + optInt2 + ",viewWidth:" + optInt3 + ",viewHeight:" + optInt4 + ",radius:" + optInt5 + ",borderTop: " + optInt6 + ",borderLeft: " + optInt7 + ",borderWidth: " + optInt8 + ",borderHeight: " + optInt9);
this.a.getJSVideoModule().showVideoLocation(optInt, optInt2, optInt3, optInt4, optInt5, optInt6, optInt7, optInt8, optInt9);
this.a.getJSCommon().f();
} catch (Throwable th) {
af.b("JS-Video-Brigde", "showVideoLocation error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void soundOperate(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt(CampaignEx.JSON_NATIVE_VIDEO_MUTE);
int optInt2 = jSONObject.optInt("view_visible");
String optString = jSONObject.optString("pt", "");
af.c("JS-Video-Brigde", "soundOperate,mute:" + optInt + ",viewVisible:" + optInt2 + ",pt:" + optString);
if (TextUtils.isEmpty(optString)) {
this.a.getJSVideoModule().soundOperate(optInt, optInt2);
} else {
this.a.getJSVideoModule().soundOperate(optInt, optInt2, optString);
}
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "soundOperate error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void videoOperate(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("pause_or_resume");
af.c("JS-Video-Brigde", "videoOperate,pauseOrResume:" + optInt);
this.a.getJSVideoModule().videoOperate(optInt);
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "videoOperate error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void closeVideoOperte(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("close");
int optInt2 = jSONObject.optInt("view_visible");
af.c("JS-Video-Brigde", "closeVideoOperte,close:" + optInt + ",viewVisible:" + optInt2);
this.a.getJSVideoModule().closeVideoOperate(optInt, optInt2);
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "closeOperte error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void progressOperate(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt(NotificationCompat.CATEGORY_PROGRESS);
int optInt2 = jSONObject.optInt("view_visible");
af.c("JS-Video-Brigde", "progressOperate,progress:" + optInt + ",viewVisible:" + optInt2);
this.a.getJSVideoModule().progressOperate(optInt, optInt2);
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "progressOperate error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void progressBarOperate(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
this.a.getJSVideoModule().progressBarOperate(new JSONObject(str).optInt("view_visible"));
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "progressOperate error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getCurrentProgress(Object obj, String str) {
try {
IJSFactory iJSFactory = this.a;
if (iJSFactory != null) {
String currentProgress = iJSFactory.getJSVideoModule().getCurrentProgress();
af.c("JS-Video-Brigde", "getCurrentProgress:" + currentProgress);
if (!TextUtils.isEmpty(currentProgress)) {
currentProgress = Base64.encodeToString(currentProgress.getBytes(), 2);
}
g.a().a(obj, currentProgress);
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getCurrentProgress error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void showVideoClickView(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("type");
af.c("JS-Video-Brigde", "showVideoClickView,type:" + optInt);
this.a.getJSContainerModule().showVideoClickView(optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "showVideoClickView error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setScaleFitXY(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("fitxy");
af.c("JS-Video-Brigde", "setScaleFitXY,type:" + optInt);
this.a.getJSVideoModule().setScaleFitXY(optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "showVideoClickView error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void notifyCloseBtn(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("state");
af.c("JS-Video-Brigde", "notifyCloseBtn,result:" + optInt);
this.a.getJSVideoModule().notifyCloseBtn(optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "notifyCloseBtn", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void openURL(Object obj, String str) {
af.b("JS-Video-Brigde", "openURL:" + str);
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("url");
int optInt = jSONObject.optInt("type");
if (optInt == 1) {
c.d(this.b, optString);
} else if (optInt == 2) {
c.f(this.b, optString);
}
} catch (JSONException e) {
af.b("JS-Video-Brigde", e.getMessage());
} catch (Throwable th) {
af.b("JS-Video-Brigde", th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void showAlertView(Object obj, String str) {
af.c("JS-Video-Brigde", "showAlertView");
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
this.a.getJSVideoModule().showIVRewardAlertView(str);
g.a().a(obj, "showAlertView", "");
} catch (Throwable th) {
af.b("JS-Video-Brigde", "showAlertView", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void toggleCloseBtn(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("state");
af.c("JS-Video-Brigde", "toggleCloseBtn,result:" + optInt);
int i = 2;
if (optInt != 1) {
i = optInt == 2 ? 1 : 0;
}
this.a.getJSVideoModule().closeVideoOperate(0, i);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "toggleCloseBtn", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void handlerH5Exception(Object obj, String str) {
try {
if (this.a == null || TextUtils.isEmpty(str)) {
return;
}
JSONObject jSONObject = new JSONObject(str);
af.c("JS-Video-Brigde", "handlerH5Exception,params:" + str);
this.a.getJSCommon().handlerH5Exception(jSONObject.optInt("code", -999), jSONObject.optString("message", "h5 error"));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "handlerH5Exception", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void isSystemResume(Object obj, String str) {
try {
if (this.a != null) {
af.c("JS-Video-Brigde", "isSystemResume,params:" + str);
g.a().a(obj, b(this.a.getActivityProxy().h()));
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "isSystemResume", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void readyStatus(Object obj, String str) {
if (obj != null) {
try {
com.mbridge.msdk.mbsignalcommon.windvane.a aVar = (com.mbridge.msdk.mbsignalcommon.windvane.a) obj;
int optInt = new JSONObject(str).optInt("isReady", 1);
if (aVar.b.getObject() instanceof k) {
((k) aVar.b.getObject()).i(optInt);
}
WindVaneWebView windVaneWebView = aVar.b;
if (windVaneWebView == null || windVaneWebView.getWebViewListener() == null) {
return;
}
windVaneWebView.getWebViewListener().a(windVaneWebView, optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "readyStatus", th);
}
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playVideoFinishOperate(Object obj, String str) {
try {
if (TextUtils.isEmpty(str) || this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("type");
af.c("JS-Video-Brigde", "playVideoFinishOperate,type: " + optInt);
this.a.getJSCommon().f(optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playVideoFinishOperate error", th);
}
}
private String b(int i) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", i);
String jSONObject2 = jSONObject.toString();
return !TextUtils.isEmpty(jSONObject2) ? Base64.encodeToString(jSONObject2.getBytes(), 2) : "";
} catch (Throwable unused) {
af.b("JS-Video-Brigde", "code to string is error");
return "";
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void reactDeveloper(Object obj, String str) {
af.a("JS-Video-Brigde", "reactDeveloper");
try {
if (this.a != null && !TextUtils.isEmpty(str)) {
this.a.getJSBTModule().reactDeveloper(obj, str);
} else {
g.a().b(obj, b(1));
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "reactDeveloper error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void reportUrls(Object obj, String str) {
af.a("JS-Video-Brigde", "reportUrls");
try {
if (!TextUtils.isEmpty(str)) {
IJSFactory iJSFactory = this.a;
if (iJSFactory != null && iJSFactory.getJSBTModule() != null) {
if (this.a.getJSBTModule() instanceof j) {
this.a.getJSBTModule().reportUrls(obj, str);
} else {
com.mbridge.msdk.video.bt.a.d.c().b(obj, str);
}
} else {
com.mbridge.msdk.video.bt.a.d.c().b(obj, str);
}
} else {
g.a().b(obj, b(1));
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "reportUrls error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getFileInfo(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().N(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getFileInfo error", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getSDKInfo(Object obj, String str) {
af.c("JS-Video-Brigde", "getSDKInfo");
try {
if (!TextUtils.isEmpty(str)) {
JSONArray jSONArray = new JSONObject(str).getJSONArray("type");
JSONObject jSONObject = new JSONObject();
int i = 0;
if (this.a != null) {
while (i < jSONArray.length()) {
int i2 = jSONArray.getInt(i);
jSONObject.put(a(i2), this.a.getJSCommon().g(i2));
i++;
}
} else if (obj != null) {
while (i < jSONArray.length()) {
int i3 = jSONArray.getInt(i);
com.mbridge.msdk.mbsignalcommon.windvane.a aVar = (com.mbridge.msdk.mbsignalcommon.windvane.a) obj;
if (aVar.b.getObject() instanceof k) {
jSONObject.put(a(i3), ((k) aVar.b.getObject()).g(i3));
}
i++;
}
}
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
return;
}
g.a().b(obj, "params is null");
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getSDKInfo error", th);
g.a().b(obj, "exception");
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void loadads(Object obj, String str) {
String str2;
String str3;
int i;
int i2;
af.c("JS-Video-Brigde", "loadads");
try {
if (TextUtils.isEmpty(str)) {
str2 = "";
str3 = str2;
i = 1;
i2 = 1;
} else {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString(MBridgeConstans.PLACEMENT_ID);
String optString2 = jSONObject.optString("unitId");
int optInt = jSONObject.optInt("type", 1);
if (optInt > 2) {
optInt = 1;
}
i2 = jSONObject.optInt("adtype", 1);
str3 = optString2;
i = optInt;
str2 = optString;
}
if (TextUtils.isEmpty(str3)) {
g.a().a(obj, b(1));
return;
}
if (obj != null) {
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if ((windVaneWebView instanceof WindVaneWebView) && windVaneWebView.getWebViewListener() != null) {
((com.mbridge.msdk.mbsignalcommon.b.a) windVaneWebView.getWebViewListener()).a(windVaneWebView, str2, str3, i, i2);
}
}
g.a().a(obj, b(0));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "loadads error", th);
g.a().a(obj, b(1));
}
}
private void a(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", 1);
jSONObject.put("message", "params is null");
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
} catch (Exception e) {
af.a("JS-Video-Brigde", e.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void createWebview(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().b(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "createWebview error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void createView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().a(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "createView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void createPlayerView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().c(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "createPlayerView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void createSubPlayTemplateView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().d(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "createSubPlayTemplateView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void destroyComponent(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().e(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "destroyComponent error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getComponentOptions(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().f(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getComponentOptions error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setViewRect(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().g(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setViewRect error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void removeFromSuperView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().h(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "removeFromSuperView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void appendSubView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().i(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "appendSubView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void appendViewTo(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().j(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "appendViewTo error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void onlyAppendSubView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().k(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "appendSubView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void onlyAppendViewTo(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().l(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "appendViewTo error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void bringViewToFront(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().m(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "bringViewToFront error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void hideView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().n(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "hideView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void showView(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().o(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "showView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setViewBgColor(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().p(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setViewBgColor error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setViewAlpha(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().q(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setViewAlpha error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setViewScale(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().r(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setViewScale error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void insertViewAbove(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().a(obj, new JSONObject(str), true);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "insertViewAbove error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void insertViewBelow(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().b(obj, new JSONObject(str), true);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "insertViewBelow error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void onlyInsertViewAbove(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().s(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "insertViewAbove error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void onlyInsertViewBelow(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().b(obj, new JSONObject(str), false);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "insertViewBelow error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void webviewLoad(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().t(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "webviewLoad error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void webviewReload(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().u(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "webviewReload error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void webviewGoBack(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().v(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "webviewGoBack error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void webviewGoForward(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().w(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "webviewGoForward error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerPlay(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().x(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerPlay error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerPause(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().y(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerPause error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerResume(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().z(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerResume error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerStop(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().A(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerStop error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerUpdateFrame(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().B(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerUpdateFrame error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerMute(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().C(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerMute error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerUnmute(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().D(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerUnmute error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerGetMuteState(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().E(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerGetMuteState error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerSetSource(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().F(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerSetSource error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void playerSetRenderType(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().G(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "playerSetRenderType error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void preloadSubPlayTemplateView(Object obj, String str) {
a(obj, str);
try {
if (this.a != null) {
com.mbridge.msdk.video.bt.a.d.c().H(obj, new JSONObject(str));
} else {
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if (windVaneWebView instanceof WindVaneWebView) {
if (windVaneWebView.getWebViewListener() != null) {
((com.mbridge.msdk.mbsignalcommon.b.a) windVaneWebView.getWebViewListener()).a(obj, str);
af.a("JS-Video-Brigde", "preloadSubPlayTemplateView: RVWebViewListener");
} else {
af.a("JS-Video-Brigde", "preloadSubPlayTemplateView: failed");
}
}
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "preloadSubPlayTemplateView error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void closeAd(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().I(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "closeAd error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void broadcast(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().J(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "broadcast error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void closeWeb(Object obj, String str) {
af.b("JS-Video-Brigde", "type" + str);
try {
if (TextUtils.isEmpty(str) || this.a == null || TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("status");
this.a.getJSContainerModule().hideAlertWebview();
this.a.getJSVideoModule().hideAlertView(optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "closeWeb", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void ivRewardAdsWithoutVideo(Object obj, String str) {
af.b("JS-Video-Brigde", "ivRewardAdsWithoutVideo params" + str);
try {
if (TextUtils.isEmpty(str) || this.a == null || TextUtils.isEmpty(str)) {
return;
}
this.a.getJSContainerModule().ivRewardAdsWithoutVideo(str);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "ivRewardAdsWithoutVideo", th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void setSubPlayTemplateInfo(Object obj, String str) {
af.b("JS-Video-Brigde", "setSubPlayTemplateInfo : " + str);
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().K(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setSubPlayTemplateInfo error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void webviewFireEvent(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().L(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "setSubPlayTemplateInfo error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void increaseOfferFrequence(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().M(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "increaseOfferFrequence error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void handleNativeObject(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.c.a().a(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "handleNativeObject error " + th);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void loadingResourceStatus(Object obj, String str) {
a(obj, str);
if (obj != null) {
try {
int optInt = new JSONObject(str).optInt("isReady", 1);
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if (windVaneWebView == null || windVaneWebView.getWebViewListener() == null) {
return;
}
windVaneWebView.getWebViewListener().c(windVaneWebView, optInt);
} catch (Throwable th) {
af.b("JS-Video-Brigde", "loadingResourceStatus error " + th);
}
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void createNativeEC(Object obj, String str) {
a(obj, str);
try {
com.mbridge.msdk.video.bt.a.d.c().O(obj, new JSONObject(str));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "createNativeEC error " + th);
}
}
/* JADX WARN: Removed duplicated region for block: B:20:0x00f6 A[ADDED_TO_REGION] */
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void setCacheItem(java.lang.Object r12, java.lang.String r13) {
/*
Method dump skipped, instructions count: 292
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.signal.communication.BaseVideoCommunication.setCacheItem(java.lang.Object, java.lang.String):void");
}
/* JADX WARN: Removed duplicated region for block: B:12:0x00e0 A[ADDED_TO_REGION] */
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void removeCacheItem(java.lang.Object r11, java.lang.String r12) {
/*
Method dump skipped, instructions count: 270
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.signal.communication.BaseVideoCommunication.removeCacheItem(java.lang.Object, java.lang.String):void");
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:19:0x00fc A[Catch: all -> 0x0100, TRY_ENTER, TryCatch #0 {all -> 0x0100, blocks: (B:16:0x00e9, B:19:0x00fc, B:21:0x0109, B:26:0x0102), top: B:15:0x00e9 }] */
/* JADX WARN: Removed duplicated region for block: B:21:0x0109 A[Catch: all -> 0x0100, TRY_LEAVE, TryCatch #0 {all -> 0x0100, blocks: (B:16:0x00e9, B:19:0x00fc, B:21:0x0109, B:26:0x0102), top: B:15:0x00e9 }] */
/* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:26:0x0102 A[Catch: all -> 0x0100, TryCatch #0 {all -> 0x0100, blocks: (B:16:0x00e9, B:19:0x00fc, B:21:0x0109, B:26:0x0102), top: B:15:0x00e9 }] */
/* JADX WARN: Type inference failed for: r0v15, types: [org.json.JSONObject] */
/* JADX WARN: Type inference failed for: r0v8, types: [org.json.JSONObject] */
/* JADX WARN: Type inference failed for: r10v10, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r10v24 */
/* JADX WARN: Type inference failed for: r10v8, types: [org.json.JSONObject] */
/* JADX WARN: Type inference failed for: r10v9 */
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void getAllCache(java.lang.Object r9, java.lang.String r10) {
/*
Method dump skipped, instructions count: 305
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.video.signal.communication.BaseVideoCommunication.getAllCache(java.lang.Object, java.lang.String):void");
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void clearAllCache(Object obj, String str) {
com.mbridge.msdk.foundation.controller.d.a();
if (this.e == null) {
try {
this.e = new FastKV.Builder(e.a(com.mbridge.msdk.foundation.same.b.c.MBRIDGE_700_CONFIG), "MBridgeH5CacheSP").build();
} catch (Exception unused) {
this.e = null;
}
}
FastKV fastKV = this.e;
if (fastKV != null) {
try {
try {
fastKV.clear();
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getAllCache error " + th);
return;
}
} catch (Exception unused2) {
}
if (obj != null) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", 0);
jSONObject.put("message", "Success");
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
return;
}
return;
}
try {
com.mbridge.msdk.foundation.controller.c.m().c().getSharedPreferences("MBridgeH5CacheSP", 0).edit().clear().apply();
if (obj != null) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", 0);
jSONObject2.put("message", "Success");
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
}
} catch (Throwable th2) {
af.b("JS-Video-Brigde", "getAllCache error " + th2);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getCutout(Object obj, String str) {
try {
String i = this.a.getJSCommon().i();
af.b("JS-Video-Brigde", i);
if (obj != null && !TextUtils.isEmpty(i)) {
g.a().a(obj, Base64.encodeToString(i.getBytes(), 2));
} else {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", 1);
jSONObject.put("message", "No notch data, plz try again later.");
g.a().b(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
}
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getCutout error : " + th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void cai(Object obj, String str) {
af.a("JS-Video-Brigde", "cai:" + str);
if (TextUtils.isEmpty(str)) {
return;
}
try {
try {
String optString = new JSONObject(str).optString(HandleInvocationsFromAdViewer.KEY_PACKAGE_NAME);
if (TextUtils.isEmpty(optString)) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "packageName is empty");
}
int i = ak.c(com.mbridge.msdk.foundation.controller.c.m().c(), optString) ? 1 : 2;
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", com.mbridge.msdk.mbsignalcommon.communication.d.b);
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("result", i);
jSONObject.put("data", jSONObject2);
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, e.getMessage());
af.a("JS-Video-Brigde", e.getMessage());
}
} catch (Throwable th) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "exception: " + th.getLocalizedMessage());
af.b("JS-Video-Brigde", "cai", th);
}
} catch (JSONException e2) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "exception: " + e2.getLocalizedMessage());
af.b("JS-Video-Brigde", "cai", e2);
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getAppSetting(Object obj, String str) {
JSONObject jSONObject;
try {
String optString = new JSONObject(str).optString("appid", "");
JSONObject jSONObject2 = new JSONObject();
if (!TextUtils.isEmpty(optString)) {
String g = h.a().g(optString);
if (TextUtils.isEmpty(g)) {
h.a();
jSONObject = new JSONObject(i.a().aM());
} else {
jSONObject = new JSONObject(g);
jSONObject.put("isDefault", 0);
}
if (obj != null) {
jSONObject2.put("code", 0);
jSONObject2.put("message", "Success");
jSONObject2.put("data", jSONObject);
} else {
jSONObject2.put("code", 1);
jSONObject2.put("message", "Get App Setting error, plz try again later.");
}
} else {
jSONObject2.put("code", 1);
jSONObject2.put("message", "Get App Setting error, because must give a appId.");
}
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getAppSetting error : " + th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getRewardSetting(Object obj, String str) {
try {
JSONObject k = b.a().b().k();
JSONObject jSONObject = new JSONObject();
if (obj != null && k != null) {
jSONObject.put("code", 0);
jSONObject.put("message", "Success");
jSONObject.put("data", k);
} else {
jSONObject.put("code", 1);
jSONObject.put("message", "Get Reward Setting error, plz try again later.");
}
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getRewardSetting error : " + th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getRewardUnitSetting(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("appid", "");
String optString2 = jSONObject.optString("unitid", "");
JSONObject jSONObject2 = new JSONObject();
if (!TextUtils.isEmpty(optString) && !TextUtils.isEmpty(optString2)) {
JSONObject E = b.a().a(optString, optString2).E();
if (obj != null && E != null) {
jSONObject2.put("code", 0);
jSONObject2.put("message", "Success");
jSONObject2.put("data", E);
} else {
jSONObject2.put("code", 1);
jSONObject2.put("message", "Get Reward Unit Setting error, plz try again later.");
}
} else {
jSONObject2.put("code", 1);
jSONObject2.put("message", "Get reward unit Setting error, because must give appId and unitId.");
}
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getRewardUnitSetting error : " + th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getUnitSetting(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", 1);
jSONObject.put("message", "Get Unit Setting error, RV/IV can not support this method.");
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getUnitSetting error : " + th.getMessage());
}
}
@Override // com.mbridge.msdk.video.signal.communication.IVideoCommunication
public void getEncryptPrice(Object obj, String str) {
String str2;
try {
String str3 = "not replaced";
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
int i = 1;
if (TextUtils.isEmpty(str)) {
str2 = "params is null";
} else {
JSONObject jSONObject3 = new JSONObject(str);
String optString = jSONObject3.optString("unitid", "");
String optString2 = jSONObject3.optString("requestId", "");
if (TextUtils.isEmpty(optString) || TextUtils.isEmpty(optString2)) {
str2 = "params parsing exception";
} else {
com.mbridge.msdk.foundation.entity.d b = com.mbridge.msdk.foundation.same.a.b.b(optString, optString2);
if (b != null && b.c() == 1) {
str3 = "success";
jSONObject2.put("encrypt_p", b.b());
jSONObject2.put(com.mbridge.msdk.foundation.entity.b.KEY_IRLFA, 1);
i = 0;
}
str2 = str3;
}
}
jSONObject.put("code", i);
jSONObject.put("message", str2);
jSONObject.put("data", jSONObject2);
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Throwable th) {
af.b("JS-Video-Brigde", "getEncryptPrice error : " + th.getMessage());
}
}
}