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,245 @@
package com.mbridge.msdk.splash.signal;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.gms.ads.AdError;
import com.ironsource.nb;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
import com.mbridge.msdk.widget.MBAdChoice;
import com.vungle.ads.internal.presenter.MRAIDPresenter;
import java.util.HashMap;
import java.util.List;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class SplashExpandDialog extends Dialog {
private final String a;
private String b;
private boolean c;
private FrameLayout d;
private WindVaneWebView e;
private TextView f;
private String g;
private List<CampaignEx> h;
private com.mbridge.msdk.splash.d.a i;
private com.mbridge.msdk.mbsignalcommon.mraid.b j;
public void setCampaignList(String str, List<CampaignEx> list) {
this.g = str;
this.h = list;
}
public SplashExpandDialog(Context context, Bundle bundle, com.mbridge.msdk.splash.d.a aVar) {
super(context);
this.a = "SplashExpandDialog";
this.j = new com.mbridge.msdk.mbsignalcommon.mraid.b() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.5
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void expand(String str, boolean z) {
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final CampaignEx getMraidCampaign() {
return null;
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void open(String str) {
try {
if (SplashExpandDialog.this.e == null || System.currentTimeMillis() - SplashExpandDialog.this.e.lastTouchTime <= com.mbridge.msdk.click.b.a.c || !com.mbridge.msdk.click.b.a.a((CampaignEx) SplashExpandDialog.this.h.get(0), SplashExpandDialog.this.e.getUrl(), com.mbridge.msdk.click.b.a.a)) {
af.b("SplashExpandDialog", str);
if (SplashExpandDialog.this.h.size() > 1) {
com.mbridge.msdk.foundation.controller.c.m().c().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
str = null;
}
if (SplashExpandDialog.this.i != null) {
SplashExpandDialog.this.i.a(true, str);
}
}
} catch (Throwable th) {
af.b("SplashExpandDialog", MRAIDPresenter.OPEN, th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void close() {
SplashExpandDialog.this.dismiss();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public final void useCustomClose(boolean z) {
try {
SplashExpandDialog.this.f.setVisibility(z ? 4 : 0);
} catch (Throwable th) {
af.b("SplashExpandDialog", "useCustomClose", th);
}
}
};
if (bundle != null) {
this.b = bundle.getString("url");
this.c = bundle.getBoolean("shouldUseCustomClose");
}
this.i = aVar;
}
@Override // android.app.Dialog
public void onCreate(Bundle bundle) {
CampaignEx campaignEx;
super.onCreate(bundle);
requestWindowFeature(1);
setCanceledOnTouchOutside(false);
setCancelable(true);
FrameLayout frameLayout = new FrameLayout(getContext());
this.d = frameLayout;
frameLayout.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
WindVaneWebView windVaneWebView = new WindVaneWebView(getContext().getApplicationContext());
this.e = windVaneWebView;
windVaneWebView.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
this.d.addView(this.e);
TextView textView = new TextView(getContext());
this.f = textView;
textView.setBackgroundColor(0);
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(96, 96);
layoutParams.gravity = 8388661;
layoutParams.setMargins(30, 30, 30, 30);
this.f.setLayoutParams(layoutParams);
this.f.setVisibility(this.c ? 4 : 0);
this.f.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
SplashExpandDialog.this.dismiss();
}
});
this.d.addView(this.f);
setContentView(this.d);
a();
this.e.setWebViewListener(new com.mbridge.msdk.mbsignalcommon.b.b() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.2
@Override // com.mbridge.msdk.mbsignalcommon.b.b, com.mbridge.msdk.mbsignalcommon.windvane.d
public final void a(WebView webView, String str) {
super.a(webView, str);
webView.evaluateJavascript("javascript:" + com.mbridge.msdk.c.b.a.a().b(), new ValueCallback<String>() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.2.1
@Override // android.webkit.ValueCallback
public final /* bridge */ /* synthetic */ void onReceiveValue(String str2) {
}
});
SplashExpandDialog.a(SplashExpandDialog.this);
}
});
this.e.setObject(this.j);
this.e.loadUrl(this.b);
List<CampaignEx> list = this.h;
if (list != null && !list.isEmpty() && (campaignEx = this.h.get(0)) != null && campaignEx.getPrivacyButtonTemplateVisibility() != 0) {
MBAdChoice mBAdChoice = new MBAdChoice(com.mbridge.msdk.foundation.controller.c.m().c());
mBAdChoice.setCampaign(campaignEx);
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f), ak.a(com.mbridge.msdk.foundation.controller.c.m().c(), 12.0f));
layoutParams2.gravity = 85;
layoutParams2.bottomMargin = layoutParams.topMargin;
layoutParams2.rightMargin = layoutParams.rightMargin;
mBAdChoice.setFeedbackDialogEventListener(new com.mbridge.msdk.foundation.d.a() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.3
@Override // com.mbridge.msdk.foundation.d.a
public final void showed() {
}
@Override // com.mbridge.msdk.foundation.d.a
public final void close() {
SplashExpandDialog.this.a();
}
@Override // com.mbridge.msdk.foundation.d.a
public final void summit(String str) {
SplashExpandDialog.this.a();
}
});
this.d.addView(mBAdChoice, layoutParams2);
}
BitmapDrawable a = com.mbridge.msdk.foundation.controller.c.m().a(this.g, 297);
if (a != null) {
ImageView imageView = new ImageView(com.mbridge.msdk.foundation.controller.c.m().c());
ak.a(imageView, a, this.d.getResources().getDisplayMetrics());
this.d.addView(imageView, new ViewGroup.LayoutParams(-1, -1));
}
setOnDismissListener(new DialogInterface.OnDismissListener() { // from class: com.mbridge.msdk.splash.signal.SplashExpandDialog.4
@Override // android.content.DialogInterface.OnDismissListener
public final void onDismiss(DialogInterface dialogInterface) {
if (SplashExpandDialog.this.i != null) {
SplashExpandDialog.this.i.a(false);
SplashExpandDialog.this.i.a();
}
SplashExpandDialog.this.e.loadDataWithBaseURL(null, "", "text/html", nb.N, null);
SplashExpandDialog.this.d.removeView(SplashExpandDialog.this.e);
SplashExpandDialog.this.e.release();
SplashExpandDialog.this.e = null;
SplashExpandDialog.this.i = null;
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public void a() {
if (getWindow() != null) {
getWindow().setBackgroundDrawable(new ColorDrawable(0));
getWindow().getDecorView().setPadding(0, 0, 0, 0);
WindowManager.LayoutParams attributes = getWindow().getAttributes();
attributes.width = -1;
attributes.height = -1;
getWindow().setAttributes(attributes);
getWindow().getDecorView().setSystemUiVisibility(4615);
}
}
@Override // android.app.Dialog, android.content.DialogInterface
public void dismiss() {
super.dismiss();
}
public static /* synthetic */ void a(SplashExpandDialog splashExpandDialog) {
try {
int i = com.mbridge.msdk.foundation.controller.c.m().c().getResources().getConfiguration().orientation;
JSONObject jSONObject = new JSONObject();
jSONObject.put("orientation", i == 2 ? "landscape" : i == 1 ? "portrait" : AdError.UNDEFINED_DOMAIN);
jSONObject.put("locked", "true");
float j = ab.j(com.mbridge.msdk.foundation.controller.c.m().c());
float h = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
HashMap i2 = ab.i(com.mbridge.msdk.foundation.controller.c.m().c());
int intValue = ((Integer) i2.get("width")).intValue();
int intValue2 = ((Integer) i2.get("height")).intValue();
HashMap hashMap = new HashMap();
hashMap.put(MRAIDCommunicatorUtil.KEY_PLACEMENTTYPE, "Interstitial");
hashMap.put("state", MRAIDCommunicatorUtil.STATES_EXPANDED);
hashMap.put(MRAIDCommunicatorUtil.KEY_VIEWABLE, "true");
hashMap.put(MRAIDCommunicatorUtil.KEY_CURRENTORIENTATION, jSONObject);
splashExpandDialog.e.getLocationInWindow(new int[2]);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e, r1[0], r1[1], r11.getWidth(), splashExpandDialog.e.getHeight());
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(splashExpandDialog.e, r1[0], r1[1], r5.getWidth(), splashExpandDialog.e.getHeight());
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(splashExpandDialog.e, j, h);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().c(splashExpandDialog.e, intValue, intValue2);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e, hashMap);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(splashExpandDialog.e);
} catch (Throwable th) {
af.b("SplashExpandDialog", "notifyMraid", th);
}
}
}

View File

@@ -0,0 +1,185 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
import android.text.TextUtils;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.AbsFeedBackForH5;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.unity3d.services.ads.gmascar.bridges.mobileads.MobileAdsBridgeBase;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class SplashSignal extends AbsFeedBackForH5 {
public static final /* synthetic */ int $r8$clinit = 0;
private static String a = "SplashSignal";
private c e;
@Override // com.mbridge.msdk.mbsignalcommon.windvane.h
public void initialize(Context context, WindVaneWebView windVaneWebView) {
super.initialize(context, windVaneWebView);
try {
if (windVaneWebView.getObject() == null || !(windVaneWebView.getObject() instanceof c)) {
return;
}
this.e = (c) windVaneWebView.getObject();
} catch (Throwable th) {
af.b(a, MobileAdsBridgeBase.initializeMethodName, th);
}
}
public void init(Object obj, String str) {
af.b(a, MobileAdsBridgeBase.initializeMethodName + str);
c cVar = this.e;
if (cVar != null) {
cVar.a(obj, str);
}
}
public void toggleCloseBtn(Object obj, String str) {
af.b(a, "toggleCloseBtn" + str);
c cVar = this.e;
if (cVar != null) {
cVar.b(obj, str);
}
}
public void triggerCloseBtn(Object obj, String str) {
af.b(a, "triggerCloseBtn" + str);
c cVar = this.e;
if (cVar != null) {
cVar.c(obj, str);
}
}
public void readyStatus(Object obj, String 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().a(windVaneWebView, optInt);
} catch (Throwable th) {
af.b(a, "readyStatus", th);
}
}
}
public void install(Object obj, String str) {
c cVar = this.e;
if (cVar != null) {
cVar.d(obj, str);
}
}
public void resetCountdown(Object obj, String str) {
af.b(a, "resetCountdown" + str);
c cVar = this.e;
if (cVar != null) {
cVar.f(obj, str);
}
}
public void openURL(Object obj, String str) {
af.b(a, "openURL" + str);
c cVar = this.e;
if (cVar != null) {
cVar.e(obj, str);
}
}
public void handlerH5Exception(Object obj, String str) {
if (obj != null) {
try {
WindVaneWebView windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b;
if (windVaneWebView == null || windVaneWebView.getWebViewListener() == null) {
return;
}
windVaneWebView.getWebViewListener().a(windVaneWebView, 0, str.toString(), windVaneWebView.getUrl());
} catch (Throwable th) {
af.b(a, "handlerH5Exception", th);
}
}
}
public void getFileInfo(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
d.a(obj, new JSONObject(str));
} catch (JSONException e) {
e.printStackTrace();
}
}
public void sendImpressions(Object obj, String str) {
try {
af.b(a, "sendImpressions");
c cVar = this.e;
if (cVar != null) {
cVar.g(obj, str);
}
} catch (Throwable th) {
af.b(a, "sendImpressions", th);
}
}
public void reportUrls(Object obj, String str) {
try {
af.b(a, "reportUrls");
c cVar = this.e;
if (cVar != null) {
cVar.h(obj, str);
}
} catch (Throwable th) {
af.b(a, "reportUrls", th);
}
}
public void increaseOfferFrequence(Object obj, String str) {
try {
d.b(obj, new JSONObject(str));
} catch (JSONException e) {
e.printStackTrace();
}
}
public void onSignalCommunication(Object obj, String str) {
try {
af.b(a, "onSignalCommunication");
c cVar = this.e;
if (cVar != null) {
cVar.i(obj, str);
}
} catch (Throwable th) {
af.b(a, "onSignalCommunication", th);
}
}
public void pauseCountDown(Object obj, String str) {
try {
af.b(a, "pauseCountDown");
c cVar = this.e;
if (cVar != null) {
cVar.j(obj, str);
}
} catch (Throwable th) {
af.b(a, "pauseCountDown", th);
}
}
public void resumeCountDown(Object obj, String str) {
try {
af.b(a, "resumeCountDown");
c cVar = this.e;
if (cVar != null) {
cVar.k(obj, str);
}
} catch (Throwable th) {
af.b(a, "resumeCountDown", th);
}
}
}

View File

@@ -0,0 +1,455 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import com.ironsource.v8;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.k;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ab;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class a implements b {
private WeakReference<Context> b;
private List<CampaignEx> c;
private String d;
private String e;
private int f;
private int g;
private int i;
private com.mbridge.msdk.splash.d.a j;
private SplashExpandDialog k;
protected String a = "SplashSignalCommunicationImpl";
private int h = 5;
public final com.mbridge.msdk.splash.d.a a() {
return this.j;
}
public final void a(int i) {
this.g = i;
}
public final void a(com.mbridge.msdk.splash.d.a aVar) {
if (aVar != null) {
this.j = aVar;
}
}
public final void a(List<CampaignEx> list) {
this.c = list;
}
public final List<CampaignEx> b() {
return this.c;
}
public final void b(int i) {
this.h = i;
}
public final void c(int i) {
this.i = i;
}
public a(Context context, String str, String str2) {
this.e = str;
this.d = str2;
this.b = new WeakReference<>(context);
}
public final void a(Context context) {
this.b = new WeakReference<>(context);
}
public final void a(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject();
com.mbridge.msdk.splash.a.b bVar = new com.mbridge.msdk.splash.a.b(com.mbridge.msdk.foundation.controller.c.m().c());
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("dev_close_state", this.f);
jSONObject.put("sdkSetting", jSONObject2);
jSONObject.put("device", bVar.a());
jSONObject.put("campaignList", CampaignEx.parseCamplistToJson(this.c));
k d = h.a().d(com.mbridge.msdk.foundation.controller.c.m().k(), this.d);
if (d == null) {
d = k.d(this.d);
}
if (!TextUtils.isEmpty(this.e)) {
d.a(this.e);
}
d.b(this.d);
d.g(this.h);
d.b(this.g);
jSONObject.put("unitSetting", d.x());
String g = h.a().g(com.mbridge.msdk.foundation.controller.c.m().k());
if (!TextUtils.isEmpty(g)) {
jSONObject.put("appSetting", new JSONObject(g));
}
jSONObject.put("sdk_info", com.mbridge.msdk.mbsignalcommon.base.d.a);
af.b(this.a, v8.a.e + jSONObject.toString());
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Throwable th) {
af.b(this.a, v8.a.e, th);
}
}
public final void b(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
int optInt = new JSONObject(str).optInt("state");
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(optInt);
}
} catch (Throwable th) {
af.b(this.a, "toggleCloseBtn", th);
}
}
public final void c(Object obj, String str) {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(obj, str);
}
}
public final void d(Object obj, String str) {
af.b(this.a, "install");
try {
List<CampaignEx> list = this.c;
if (list == null) {
return;
}
CampaignEx campaignEx = (list == null || list.size() <= 0) ? null : this.c.get(0);
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONObject campaignToJsonObject = CampaignEx.campaignToJsonObject(campaignEx);
JSONObject jSONObject = new JSONObject(str);
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
campaignToJsonObject.put(next, jSONObject.getString(next));
}
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(campaignToJsonObject);
String optString = campaignToJsonObject.optString("unitId");
if (!TextUtils.isEmpty(optString)) {
parseCampaignWithBackData.setCampaignUnitId(optString);
}
campaignEx = parseCampaignWithBackData;
} catch (JSONException e) {
e.printStackTrace();
}
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(campaignEx);
}
} catch (Throwable th) {
af.b(this.a, "click", th);
}
}
public final void e(Object obj, String str) {
WindVaneWebView windVaneWebView;
af.b(this.a, "openURL:" + str);
if (TextUtils.isEmpty(str)) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "params is null");
return;
}
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
if (TextUtils.isEmpty(str)) {
return;
}
if (c == null) {
try {
if ((obj instanceof com.mbridge.msdk.mbsignalcommon.windvane.a) && (windVaneWebView = ((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b) != null) {
c = windVaneWebView.getContext();
}
} catch (Exception e) {
af.b(this.a, e.getMessage());
}
}
if (c == null) {
return;
}
try {
JSONObject jSONObject = new JSONObject(str);
String optString = jSONObject.optString("url");
int optInt = jSONObject.optInt("type");
if (optInt == 1) {
com.mbridge.msdk.click.c.d(c, optString);
} else if (optInt == 2) {
com.mbridge.msdk.click.c.f(c, optString);
}
} catch (JSONException e2) {
af.b(this.a, e2.getMessage());
} catch (Throwable th) {
af.b(this.a, th.getMessage());
}
}
public final void f(Object obj, String str) {
try {
if (TextUtils.isEmpty(str)) {
return;
}
int i = new JSONObject(str).getInt("countdown");
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.b(i);
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void open(String str) {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(true, str);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void close() {
af.b(this.a, "close");
try {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a();
}
} catch (Throwable th) {
af.b(this.a, "close", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void unload() {
close();
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public CampaignEx getMraidCampaign() {
List<CampaignEx> list = this.c;
if (list == null || list.size() <= 0) {
return null;
}
return this.c.get(0);
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void useCustomClose(boolean z) {
int i = z ? 2 : 1;
try {
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(i);
}
} catch (Throwable th) {
af.b(this.a, "useCustomClose", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
public void expand(String str, boolean z) {
try {
Bundle bundle = new Bundle();
bundle.putString("url", str);
bundle.putBoolean("shouldUseCustomClose", z);
WeakReference<Context> weakReference = this.b;
if (weakReference == null || weakReference.get() == null) {
return;
}
SplashExpandDialog splashExpandDialog = this.k;
if (splashExpandDialog == null || !splashExpandDialog.isShowing()) {
SplashExpandDialog splashExpandDialog2 = new SplashExpandDialog(this.b.get(), bundle, this.j);
this.k = splashExpandDialog2;
splashExpandDialog2.setCampaignList(this.d, this.c);
this.k.show();
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(true);
}
String str2 = this.d;
CampaignEx mraidCampaign = getMraidCampaign();
try {
JSONObject jSONObject = new JSONObject();
if (mraidCampaign.isBidCampaign()) {
jSONObject.put("hb", 1);
}
jSONObject.put("key", "2000070");
jSONObject.put("rid_n", mraidCampaign.getRequestIdNotice());
jSONObject.put("rid", mraidCampaign.getRequestId());
jSONObject.put(BidResponsedEx.KEY_CID, mraidCampaign.getId());
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str2);
jSONObject.put(CampaignEx.JSON_KEY_CLICK_URL, str);
jSONObject.put("network_type", String.valueOf(ab.m(com.mbridge.msdk.foundation.controller.c.m().c())));
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
} catch (Exception e) {
af.b("SplashReport", e.getMessage());
}
}
} catch (Throwable th) {
af.b(this.a, "expand", th);
}
}
public final void g(Object obj, String str) {
af.a(this.a, "sendImpressions:" + str);
try {
if (TextUtils.isEmpty(str)) {
return;
}
JSONArray jSONArray = new JSONArray(str);
final ArrayList arrayList = new ArrayList();
for (int i = 0; i < jSONArray.length(); i++) {
String string = jSONArray.getString(i);
for (CampaignEx campaignEx : this.c) {
if (campaignEx.getId().equals(string)) {
com.mbridge.msdk.foundation.same.a.b.a(this.d, campaignEx, "splash");
arrayList.add(string);
}
}
}
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.signal.a.1
@Override // java.lang.Runnable
public final void run() {
try {
j a = j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
Iterator it = arrayList.iterator();
while (it.hasNext()) {
a.a((String) it.next());
}
} catch (Exception unused) {
af.b(a.this.a, "campain can't insert db");
}
}
}).start();
} catch (Throwable th) {
af.b(this.a, "sendImpressions", th);
}
}
public final void h(Object obj, String str) {
af.a(this.a, "reportUrls:" + str);
if (TextUtils.isEmpty(str)) {
com.mbridge.msdk.mbsignalcommon.communication.d.a(obj, "params is null");
return;
}
if (TextUtils.isEmpty(str)) {
return;
}
try {
JSONArray jSONArray = new JSONArray(str);
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
int optInt = jSONObject.optInt("type");
String a = ak.a(jSONObject.optString("url"), "&tun=", ab.q() + "");
int optInt2 = jSONObject.optInt("report");
if (optInt2 == 0) {
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
List<CampaignEx> list = this.c;
com.mbridge.msdk.click.a.a(c, list != null ? list.get(0) : null, "", a, false, optInt != 0);
} else {
Context c2 = com.mbridge.msdk.foundation.controller.c.m().c();
List<CampaignEx> list2 = this.c;
com.mbridge.msdk.click.a.a(c2, list2 != null ? list2.get(0) : null, "", a, false, optInt != 0, optInt2);
}
}
g.a().a(obj, d.a(0));
} catch (Throwable th) {
af.b(this.a, "reportUrls", th);
}
}
public final void i(Object obj, String str) {
try {
if (obj instanceof com.mbridge.msdk.mbsignalcommon.windvane.a) {
g.a().a(((com.mbridge.msdk.mbsignalcommon.windvane.a) obj).b);
}
} catch (Throwable th) {
af.b(this.a, "onJSBridgeConnect", th);
}
}
public final void j(Object obj, String str) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("code", 0);
jSONObject.put("message", "Call pause count down success.");
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("countdown", this.i);
jSONObject.put("data", jSONObject2);
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
af.b(this.a, e.getMessage());
}
com.mbridge.msdk.splash.d.a aVar = this.j;
if (aVar != null) {
aVar.a(1, -1);
}
}
/* JADX WARN: Removed duplicated region for block: B:5:0x0030 */
/* JADX WARN: Removed duplicated region for block: B:8:? A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void k(java.lang.Object r3, java.lang.String r4) {
/*
r2 = this;
boolean r0 = android.text.TextUtils.isEmpty(r4)
r1 = 0
if (r0 != 0) goto L2c
org.json.JSONObject r0 = new org.json.JSONObject // Catch: java.lang.Exception -> L22
r0.<init>(r4) // Catch: java.lang.Exception -> L22
java.lang.String r4 = "countdown"
int r4 = r0.optInt(r4) // Catch: java.lang.Exception -> L22
com.mbridge.msdk.mbsignalcommon.windvane.g r0 = com.mbridge.msdk.mbsignalcommon.windvane.g.a() // Catch: java.lang.Exception -> L1f
java.lang.String r1 = com.mbridge.msdk.splash.signal.d.a(r1) // Catch: java.lang.Exception -> L1f
r0.a(r3, r1) // Catch: java.lang.Exception -> L1f
r1 = r4
goto L2c
L1f:
r3 = move-exception
r1 = r4
goto L23
L22:
r3 = move-exception
L23:
java.lang.String r4 = r2.a
java.lang.String r3 = r3.getMessage()
com.mbridge.msdk.foundation.tools.af.b(r4, r3)
L2c:
com.mbridge.msdk.splash.d.a r3 = r2.j
if (r3 == 0) goto L34
r4 = 2
r3.a(r4, r1)
L34:
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.signal.a.k(java.lang.Object, java.lang.String):void");
}
}

View File

@@ -0,0 +1,5 @@
package com.mbridge.msdk.splash.signal;
/* loaded from: classes4.dex */
public interface b extends com.mbridge.msdk.mbsignalcommon.mraid.b {
}

View File

@@ -0,0 +1,10 @@
package com.mbridge.msdk.splash.signal;
import android.content.Context;
/* loaded from: classes4.dex */
public final class c extends a {
public c(Context context, String str, String str2) {
super(context, str, str2);
}
}

View File

@@ -0,0 +1,301 @@
package com.mbridge.msdk.splash.signal;
import android.text.TextUtils;
import android.util.Base64;
import android.webkit.WebView;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.db.j;
import com.mbridge.msdk.foundation.db.n;
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.entity.m;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.aj;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import java.io.File;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public final class d {
private static String a = "SplashSignalUtils";
private static int b = 0;
private static int c = 1;
public static void a(Object obj, JSONObject jSONObject) {
String str;
JSONArray jSONArray;
String str2;
String str3;
JSONArray jSONArray2;
int i;
boolean z;
String str4;
File file;
String str5 = "";
JSONObject jSONObject2 = new JSONObject();
String str6 = "message";
int i2 = 1;
if (jSONObject == null) {
try {
jSONObject2.put("code", 1);
jSONObject2.put("message", "params is null");
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
return;
} catch (JSONException e) {
af.a(a, e.getMessage());
return;
}
}
try {
jSONObject2.put("code", 0);
jSONObject2.put("message", "");
jSONArray = jSONObject.getJSONArray("resource");
} catch (Throwable th) {
th = th;
str = "message";
}
try {
if (jSONArray != null) {
try {
if (jSONArray.length() > 0) {
JSONArray jSONArray3 = new JSONArray();
int length = jSONArray.length();
int i3 = 0;
while (i3 < length) {
JSONObject jSONObject3 = jSONArray.getJSONObject(i3);
String optString = jSONObject3.optString("ref", str5);
int i4 = jSONObject3.getInt("type");
JSONObject jSONObject4 = new JSONObject();
if (i4 == i2 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject5 = new JSONObject();
m a2 = n.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(optString);
if (a2 != null) {
jSONArray2 = jSONArray;
i = length;
af.a(a, "VideoBean not null");
jSONObject5.put("type", 1);
jSONObject5.put("videoDataLength", a2.d());
String e2 = a2.e();
str2 = str6;
if (TextUtils.isEmpty(e2)) {
af.a(a, "VideoPath null");
jSONObject5.put("path", str5);
jSONObject5.put("path4Web", str5);
str3 = str5;
} else {
str3 = str5;
af.a(a, "VideoPath not null");
jSONObject5.put("path", e2);
jSONObject5.put("path4Web", e2);
}
if (a2.b() == 5) {
jSONObject5.put("downloaded", 1);
z = false;
} else {
z = false;
jSONObject5.put("downloaded", 0);
}
jSONObject4.put(optString, jSONObject5);
jSONArray3.put(jSONObject4);
} else {
str3 = str5;
str2 = str6;
jSONArray2 = jSONArray;
i = length;
z = false;
af.a(a, "VideoBean null");
}
} else {
str3 = str5;
str2 = str6;
jSONArray2 = jSONArray;
i = length;
z = false;
if (i4 == 2 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject6 = new JSONObject();
jSONObject6.put("type", 2);
jSONObject6.put("path", H5DownLoadManager.getInstance().getH5ResAddress(optString) == null ? str3 : H5DownLoadManager.getInstance().getH5ResAddress(optString));
jSONObject4.put(optString, jSONObject6);
jSONArray3.put(jSONObject4);
} else if (i4 == 3 && !TextUtils.isEmpty(optString)) {
try {
file = new File(optString);
} catch (Throwable th2) {
if (MBridgeConstans.DEBUG) {
th2.printStackTrace();
}
}
if (file.exists() && file.isFile() && file.canRead()) {
af.a(a, "getFileInfo Mraid file " + optString);
str4 = "file:////" + optString;
JSONObject jSONObject7 = new JSONObject();
jSONObject7.put("type", 3);
jSONObject7.put("path", str4);
jSONObject4.put(optString, jSONObject7);
jSONArray3.put(jSONObject4);
}
str4 = str3;
JSONObject jSONObject72 = new JSONObject();
jSONObject72.put("type", 3);
jSONObject72.put("path", str4);
jSONObject4.put(optString, jSONObject72);
jSONArray3.put(jSONObject4);
} else if (i4 == 4 && !TextUtils.isEmpty(optString)) {
JSONObject jSONObject8 = new JSONObject();
jSONObject8.put("type", 4);
jSONObject8.put("path", aj.a(optString) == null ? str3 : aj.a(optString));
jSONObject4.put(optString, jSONObject8);
jSONArray3.put(jSONObject4);
}
}
i3++;
jSONArray = jSONArray2;
length = i;
str6 = str2;
str5 = str3;
i2 = 1;
}
jSONObject2.put("resource", jSONArray3);
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
return;
}
} catch (Throwable th3) {
th = th3;
str2 = str6;
str = str2;
try {
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (JSONException e3) {
af.a(a, e3.getMessage());
return;
}
}
}
str = 1;
try {
try {
jSONObject2.put("code", 1);
str = "message";
try {
jSONObject2.put(str, "resource is null");
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (JSONException e4) {
e = e4;
af.a(a, e.getMessage());
}
} catch (Throwable th4) {
th = th4;
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
}
} catch (JSONException e5) {
e = e5;
str = "message";
}
} catch (Throwable th5) {
th = th5;
str = str2;
jSONObject2.put("code", 1);
jSONObject2.put(str, th.getLocalizedMessage());
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
}
}
public static String a(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(a, "code to string is error");
return "";
}
}
public static void b(Object obj, JSONObject jSONObject) {
try {
JSONObject optJSONObject = jSONObject.optJSONObject("data");
if (optJSONObject == null) {
a(obj, "data is empty");
return;
}
final CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(optJSONObject);
if (parseCampaignWithBackData == null) {
a(obj, "data camapign is empty");
return;
}
new Thread(new Runnable() { // from class: com.mbridge.msdk.splash.signal.d.1
@Override // java.lang.Runnable
public final void run() {
try {
j a2 = j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
if (a2 != null) {
if (!a2.b(CampaignEx.this.getId())) {
com.mbridge.msdk.foundation.entity.g gVar = new com.mbridge.msdk.foundation.entity.g();
gVar.a(CampaignEx.this.getId());
gVar.b(CampaignEx.this.getFca());
gVar.c(CampaignEx.this.getFcb());
gVar.a(0);
gVar.d(1);
gVar.a(System.currentTimeMillis());
a2.a(gVar);
} else {
a2.a(CampaignEx.this.getId());
}
}
d.a(CampaignEx.this.getCampaignUnitId(), CampaignEx.this);
} catch (Throwable th) {
af.b(d.a, th.getMessage(), th);
}
}
}).start();
try {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("code", b);
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("id", "");
jSONObject2.put("data", jSONObject3);
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
} catch (Exception e) {
a(obj, e.getMessage());
af.a(a, e.getMessage());
}
} catch (Throwable th) {
a(obj, th.getMessage());
}
}
private static void a(Object obj, String str) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("code", c);
jSONObject.put("message", str);
jSONObject.put("data", new JSONObject());
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (Exception e) {
af.a(a, e.getMessage());
}
}
public static void a(WebView webView, String str, String str2) {
g.a().a(webView, str, str2);
}
public static void a(WebView webView) {
af.b(a, "fireOnSignalCommunication");
g.a().a(webView);
}
public static /* synthetic */ void a(String str, CampaignEx campaignEx) {
if (com.mbridge.msdk.foundation.same.a.b.l == null || TextUtils.isEmpty(campaignEx.getId())) {
return;
}
com.mbridge.msdk.foundation.same.a.b.a(str, campaignEx, "splash");
}
}