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,237 @@
package com.mbridge.msdk.advanced.view;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import com.google.android.gms.ads.AdError;
import com.mbridge.msdk.advanced.signal.b;
import com.mbridge.msdk.foundation.controller.c;
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.g;
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
import java.util.HashMap;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBNativeAdvancedView extends RelativeLayout {
private static String a = "MBAdvancedNativeView";
private MBNativeAdvancedWebview b;
private View c;
private boolean d;
private boolean e;
private boolean f;
private b g;
private Context h;
public void clearResState() {
this.f = false;
this.e = false;
this.d = false;
}
public b getAdvancedNativeSignalCommunicationImpl() {
return this.g;
}
public MBNativeAdvancedWebview getAdvancedNativeWebview() {
return this.b;
}
public View getCloseView() {
return this.c;
}
public boolean isEndCardReady() {
return this.f;
}
public boolean isH5Ready() {
return this.d;
}
public boolean isVideoReady() {
return this.e;
}
public void resetLoadState() {
this.f = false;
this.e = false;
this.d = false;
}
public void setEndCardReady(boolean z) {
this.f = z;
}
public void setH5Ready(boolean z) {
this.d = z;
}
public void setVideoReady(boolean z) {
this.e = z;
}
public void setAdvancedNativeSignalCommunicationImpl(b bVar) {
this.g = bVar;
MBNativeAdvancedWebview mBNativeAdvancedWebview = this.b;
if (mBNativeAdvancedWebview != null) {
mBNativeAdvancedWebview.setObject(bVar);
}
}
public MBNativeAdvancedView(Context context) {
this(context, null);
}
public MBNativeAdvancedView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public MBNativeAdvancedView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.h = context;
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
}
public void setAdvancedNativeWebview(MBNativeAdvancedWebview mBNativeAdvancedWebview) {
this.b = mBNativeAdvancedWebview;
b bVar = this.g;
if (bVar != null) {
mBNativeAdvancedWebview.setObject(bVar);
}
}
public void changeCloseBtnState(int i) {
View view = this.c;
if (view != null) {
if (i == 2) {
view.setVisibility(8);
} else {
view.setVisibility(0);
}
}
}
public void setCloseView(View view) {
this.c = view;
if (view != null) {
view.setContentDescription("closeButton");
}
}
public void clearResStateAndRemoveClose() {
clearResState();
View view = this.c;
if (view == null || view.getParent() == null) {
return;
}
removeView(this.c);
}
public static void transInfoForMraid(WebView webView, int i, int i2, int i3, int i4) {
af.b(a, "transInfoForMraid");
try {
int i5 = c.m().c().getResources().getConfiguration().orientation;
JSONObject jSONObject = new JSONObject();
jSONObject.put("orientation", i5 == 2 ? "landscape" : i5 == 1 ? "portrait" : AdError.UNDEFINED_DOMAIN);
jSONObject.put("locked", "true");
float j = ab.j(c.m().c());
float h = ab.h(c.m().c());
HashMap i6 = ab.i(c.m().c());
int intValue = ((Integer) i6.get("width")).intValue();
int intValue2 = ((Integer) i6.get("height")).intValue();
HashMap hashMap = new HashMap();
hashMap.put(MRAIDCommunicatorUtil.KEY_PLACEMENTTYPE, "inline");
hashMap.put("state", MRAIDCommunicatorUtil.STATES_DEFAULT);
hashMap.put(MRAIDCommunicatorUtil.KEY_VIEWABLE, "true");
hashMap.put(MRAIDCommunicatorUtil.KEY_CURRENTORIENTATION, jSONObject);
float f = i;
float f2 = i2;
float f3 = i3;
float f4 = i4;
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView, f, f2, f3, f4);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(webView, f, f2, f3, f4);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().b(webView, j, h);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().c(webView, intValue, intValue2);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView, hashMap);
com.mbridge.msdk.mbsignalcommon.mraid.a.a().a(webView);
} catch (Throwable th) {
af.b(a, "transInfoForMraid", th);
}
}
public void destroy() {
removeAllViews();
MBNativeAdvancedWebview mBNativeAdvancedWebview = this.b;
if (mBNativeAdvancedWebview != null && !mBNativeAdvancedWebview.isDestoryed()) {
this.b.release();
com.mbridge.msdk.advanced.signal.a.a(this.b, "onSystemDestory", "");
}
if (this.h != null) {
this.h = null;
}
}
public void show() {
MBNativeAdvancedWebview mBNativeAdvancedWebview = this.b;
if (mBNativeAdvancedWebview != null && mBNativeAdvancedWebview.getParent() == null) {
addView(this.b, new ViewGroup.LayoutParams(-1, -1));
}
int[] iArr = new int[2];
this.b.getLocationInWindow(iArr);
MBNativeAdvancedWebview mBNativeAdvancedWebview2 = this.b;
transInfoForMraid(mBNativeAdvancedWebview2, iArr[0], iArr[1], mBNativeAdvancedWebview2.getWidth(), this.b.getHeight());
MBNativeAdvancedWebview mBNativeAdvancedWebview3 = this.b;
if (mBNativeAdvancedWebview3 != null) {
mBNativeAdvancedWebview3.setObject(this.g);
this.b.post(new Runnable() { // from class: com.mbridge.msdk.advanced.view.MBNativeAdvancedView.1
@Override // java.lang.Runnable
public final void run() {
try {
af.a(MBNativeAdvancedView.a, "webviewshow");
String str = "";
try {
int[] iArr2 = new int[2];
MBNativeAdvancedView.this.b.getLocationOnScreen(iArr2);
af.b(MBNativeAdvancedView.a, "coordinate:" + iArr2[0] + "--" + iArr2[1]);
JSONObject jSONObject = new JSONObject();
jSONObject.put("startX", ak.b(c.m().c(), (float) iArr2[0]));
jSONObject.put("startY", ak.b(c.m().c(), (float) iArr2[1]));
str = jSONObject.toString();
} catch (Throwable th) {
af.b(MBNativeAdvancedView.a, th.getMessage(), th);
}
g.a().a((WebView) MBNativeAdvancedView.this.b, "webviewshow", Base64.encodeToString(str.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
View view = this.c;
if (view != null) {
if (view.getParent() == null) {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 28.0f), ak.a(getContext(), 16.0f));
layoutParams.addRule(10);
layoutParams.addRule(11);
layoutParams.rightMargin = ak.a(getContext(), 2.0f);
layoutParams.topMargin = ak.a(getContext(), 2.0f);
addView(this.c, layoutParams);
} else {
bringChildToFront(this.c);
}
}
clearResState();
}
}

View File

@@ -0,0 +1,78 @@
package com.mbridge.msdk.advanced.view;
import android.content.Context;
import android.content.IntentFilter;
import com.iab.omid.library.mmadbridge.adsession.AdSession;
import com.mbridge.msdk.advanced.common.NetWorkStateReceiver;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
/* loaded from: classes4.dex */
public class MBNativeAdvancedWebview extends WindVaneWebView {
private static final String e = "MBNativeAdvancedWebview";
private AdSession f;
private NetWorkStateReceiver g;
public AdSession getAdSession() {
return this.f;
}
public void setAdSession(AdSession adSession) {
this.f = adSession;
}
public MBNativeAdvancedWebview(Context context) {
super(context);
setBackgroundColor(0);
}
@Override // android.webkit.WebView, android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
registerNetWorkReceiver();
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
unregisterNetWorkReceiver();
}
public void registerNetWorkReceiver() {
try {
if (this.g == null) {
this.g = new NetWorkStateReceiver(this);
}
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
getContext().registerReceiver(this.g, intentFilter);
} catch (Throwable th) {
af.a(e, th.getMessage());
}
}
public void unregisterNetWorkReceiver() {
try {
NetWorkStateReceiver netWorkStateReceiver = this.g;
if (netWorkStateReceiver != null) {
netWorkStateReceiver.a();
getContext().unregisterReceiver(this.g);
}
} catch (Throwable th) {
af.a(e, th.getMessage());
}
}
public void finishAdSession() {
try {
AdSession adSession = this.f;
if (adSession != null) {
adSession.finish();
this.f = null;
af.a("OMSDK", "finish adSession");
}
} catch (Exception e2) {
af.a("OMSDK", e2.getMessage());
}
}
}

View File

@@ -0,0 +1,77 @@
package com.mbridge.msdk.advanced.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import com.mbridge.msdk.advanced.b.c;
/* loaded from: classes4.dex */
public class MBOutNativeAdvancedViewGroup extends RelativeLayout {
private c a;
public void setProvider(c cVar) {
this.a = cVar;
}
public MBOutNativeAdvancedViewGroup(Context context) {
super(context);
}
public MBOutNativeAdvancedViewGroup(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBOutNativeAdvancedViewGroup(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
if (this.a != null) {
a(1);
if (getVisibility() == 0) {
a(2);
}
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
c cVar = this.a;
if (cVar != null) {
cVar.e(1);
}
}
@Override // android.view.View
public void onVisibilityChanged(@NonNull View view, int i) {
super.onVisibilityChanged(view, i);
if (i == 0) {
a(2);
if (getParent() != null) {
a(1);
return;
}
return;
}
c cVar = this.a;
if (cVar != null) {
cVar.e(2);
}
}
private void a(final int i) {
postDelayed(new Runnable() { // from class: com.mbridge.msdk.advanced.view.MBOutNativeAdvancedViewGroup.1
@Override // java.lang.Runnable
public final void run() {
if (MBOutNativeAdvancedViewGroup.this.a != null) {
MBOutNativeAdvancedViewGroup.this.a.d(i);
}
}
}, 200L);
}
}

View File

@@ -0,0 +1,131 @@
package com.mbridge.msdk.advanced.view;
import android.graphics.Bitmap;
import android.net.Uri;
import android.text.TextUtils;
import android.webkit.ValueCallback;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import androidx.annotation.Nullable;
import androidx.webkit.ProxyConfig;
import com.facebook.share.internal.ShareConstants;
import com.ironsource.nb;
import com.mbridge.msdk.advanced.b.c;
import com.mbridge.msdk.foundation.same.b.e;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.z;
import com.mbridge.msdk.mbsignalcommon.base.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.vungle.ads.internal.model.AdPayload;
import java.io.FileInputStream;
import java.net.URLDecoder;
import java.util.HashMap;
/* loaded from: classes4.dex */
public final class a extends b {
String a;
com.mbridge.msdk.advanced.b.a b;
private final String c = "NativeAdvancedWebViewClient";
private final String d;
private final String e;
private c f;
public final void a() {
if (this.f != null) {
this.f = null;
}
}
public a(String str, com.mbridge.msdk.advanced.b.a aVar, c cVar) {
com.mbridge.msdk.foundation.same.b.c cVar2 = com.mbridge.msdk.foundation.same.b.c.MBRIDGE_VC;
this.d = e.a(cVar2) != null ? e.a(cVar2) : z.a("YkRXhr5AWBPfNgzuH7JQ+2Ha");
this.e = z.a("Y+xgWkl2");
this.a = str;
this.b = aVar;
this.f = cVar;
}
@Override // android.webkit.WebViewClient
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
super.onPageStarted(webView, str, bitmap);
try {
webView.evaluateJavascript("javascript:" + com.mbridge.msdk.c.b.a.a().b(), new ValueCallback<String>() { // from class: com.mbridge.msdk.advanced.view.a.1
@Override // android.webkit.ValueCallback
public final /* bridge */ /* synthetic */ void onReceiveValue(String str2) {
}
});
} catch (Throwable th) {
af.b("NativeAdvancedWebViewClient", "onPageStarted", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.base.b, android.webkit.WebViewClient
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
try {
try {
WindVaneWebView windVaneWebView = (WindVaneWebView) webView;
if (System.currentTimeMillis() - windVaneWebView.lastTouchTime > com.mbridge.msdk.click.b.a.c) {
if (com.mbridge.msdk.click.b.a.a(((com.mbridge.msdk.advanced.signal.b) windVaneWebView.getObject()).a().get(0), windVaneWebView.getUrl(), com.mbridge.msdk.click.b.a.b)) {
return false;
}
}
} catch (Exception e) {
af.b("NativeAdvancedWebViewClient", e.getMessage());
}
af.b("NativeAdvancedWebViewClient", "Use html to open url.");
com.mbridge.msdk.advanced.b.a aVar = this.b;
if (aVar == null) {
return true;
}
aVar.a(false, str);
return true;
} catch (Throwable th) {
af.b("NativeAdvancedWebViewClient", "shouldOverrideUrlLoading", th);
return false;
}
}
@Override // android.webkit.WebViewClient
@Nullable
public final WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
return a(webView, str);
}
@Override // android.webkit.WebViewClient
@Nullable
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
return a(webView, webResourceRequest.getUrl().toString());
}
private WebResourceResponse a(WebView webView, String str) {
Uri parse;
String scheme;
if (!TextUtils.isEmpty(str) && this.f != null) {
try {
String str2 = "";
if (str.startsWith("file") && str.startsWith(this.d)) {
str2 = str.replace(AdPayload.FILE_SCHEME, "");
}
if (!TextUtils.isEmpty(str) && (parse = Uri.parse(str)) != null && (scheme = parse.getScheme()) != null && !TextUtils.isEmpty(scheme) && (scheme.equals(this.e) || scheme.equals("mb-h5"))) {
str2 = this.f.d(URLDecoder.decode(Uri.parse(str).getQueryParameter(ShareConstants.MEDIA_URI)));
}
if (!TextUtils.isEmpty(str2) && a(str2, this.d)) {
af.a("NativeAdvancedWebViewClient", "replace url : " + str2);
if (!str2.contains("127.0.0.1") && !str2.startsWith("http")) {
HashMap hashMap = new HashMap();
hashMap.put("Access-Control-Allow-Origin", ProxyConfig.MATCH_ALL_SCHEMES);
WebResourceResponse webResourceResponse = new WebResourceResponse(MimeTypes.VIDEO_MP4, nb.N, new FileInputStream(str2));
webResourceResponse.setResponseHeaders(hashMap);
return webResourceResponse;
}
return null;
}
} catch (Throwable th) {
af.b("NativeAdvancedWebViewClient", th.getMessage());
}
}
return null;
}
}