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,236 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.graphics.Bitmap;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ae;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.foundation.tools.ak;
import com.mbridge.msdk.shake.MBShakeView;
import com.mbridge.msdk.shake.b;
import com.mbridge.msdk.splash.view.nativeview.MBNoRecycledCrashImageView;
import com.mbridge.msdk.splash.view.nativeview.MBSplashClickView;
import com.mbridge.msdk.widget.FeedBackButton;
/* loaded from: classes4.dex */
public class BaseMBSplashNativeView extends RelativeLayout {
private MBNoRecycledCrashImageView A;
private TextView B;
private MBNoRecycledCrashImageView C;
private TextView D;
private TextView E;
private int F;
private int G;
private int H;
private int I;
private int J;
private int K;
private float L;
private float M;
private boolean N;
private boolean O;
private String P;
private String Q;
private String R;
private String S;
protected TextView a;
protected RelativeLayout b;
protected TextView c;
protected TextView d;
protected TextView e;
protected TextView f;
protected MBSplashClickView g;
protected int h;
protected int i;
protected int j;
protected int k;
protected int l;
protected boolean m;
protected boolean n;
protected boolean o;
protected String p;
protected MBSplashView q;
protected CampaignEx r;
protected MBShakeView s;
protected b t;
private MBNoRecycledCrashImageView u;
private MBNoRecycledCrashImageView v;
private RelativeLayout w;
private ImageView x;
private FeedBackButton y;
private RelativeLayout z;
public void a() {
}
public void b() {
}
public void setIsPause(boolean z) {
this.n = z;
}
public BaseMBSplashNativeView(Context context) {
super(context);
this.n = false;
this.o = false;
}
public BaseMBSplashNativeView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public BaseMBSplashNativeView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.n = false;
this.o = false;
}
/* JADX WARN: Removed duplicated region for block: B:40:0x03cf */
/* JADX WARN: Removed duplicated region for block: B:43:0x03ee */
/* JADX WARN: Removed duplicated region for block: B:47:0x03f7 */
/* JADX WARN: Removed duplicated region for block: B:48:0x03d5 */
/* JADX WARN: Removed duplicated region for block: B:58:0x03bf */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public BaseMBSplashNativeView(android.content.Context r11, com.mbridge.msdk.splash.view.MBSplashView r12, com.mbridge.msdk.splash.a.c r13) {
/*
Method dump skipped, instructions count: 1052
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.mbridge.msdk.splash.view.BaseMBSplashNativeView.<init>(android.content.Context, com.mbridge.msdk.splash.view.MBSplashView, com.mbridge.msdk.splash.a.c):void");
}
public final void a(int i) {
if (this.q.getSplashSignalCommunicationImpl() == null || this.q.getSplashSignalCommunicationImpl().a() == null) {
return;
}
try {
this.q.getSplashSignalCommunicationImpl().a().a(com.mbridge.msdk.splash.a.a.a.a(com.mbridge.msdk.splash.a.a.a.a(i, this.L, this.M), this.r));
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
this.q.getSplashSignalCommunicationImpl().a().a(this.r);
}
}
public void updateCountDown(int i) {
String str;
if (this.a != null) {
this.F = i;
if (this.m) {
str = this.R + " " + i + this.Q;
} else {
str = i + this.Q + " " + this.S;
}
this.a.setText(str);
}
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
try {
RelativeLayout relativeLayout = this.w;
if (relativeLayout == null) {
return;
}
RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams();
int i5 = this.K;
layoutParams.leftMargin = i + i5;
layoutParams.rightMargin = i2 + i5;
layoutParams.topMargin = i3 + i5;
layoutParams.bottomMargin = i5 + i4;
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
}
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
try {
if (this.j != 1 || this.s == null || this.t == null) {
return;
}
com.mbridge.msdk.shake.a.a().a(this.t);
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
release();
}
@Override // android.view.ViewGroup
public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
this.L = motionEvent.getRawX();
this.M = motionEvent.getRawY();
return super.onInterceptTouchEvent(motionEvent);
}
public void release() {
try {
if (this.t != null) {
com.mbridge.msdk.shake.a.a().b(this.t);
this.t = null;
}
com.mbridge.msdk.foundation.d.b.a().c(this.p);
detachAllViewsFromParent();
} catch (Exception e) {
af.b("MBSplashNativeView", e.getMessage());
}
}
public static /* synthetic */ void f(BaseMBSplashNativeView baseMBSplashNativeView) {
if (!TextUtils.isEmpty(baseMBSplashNativeView.r.getIconUrl())) {
com.mbridge.msdk.foundation.same.c.b.a(c.m().c()).a(baseMBSplashNativeView.r.getIconUrl(), new com.mbridge.msdk.foundation.same.c.c() { // from class: com.mbridge.msdk.splash.view.BaseMBSplashNativeView.2
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onSuccessLoad(Bitmap bitmap, String str) {
Bitmap a;
if (bitmap != null) {
try {
if (bitmap.isRecycled()) {
return;
}
try {
if (BaseMBSplashNativeView.this.A == null || (a = ae.a(bitmap, 1, ak.a(c.m().c(), 40.0f))) == null || a.isRecycled()) {
return;
}
BaseMBSplashNativeView.this.A.setImageBitmap(a);
} catch (Throwable th) {
af.b("MBSplashNativeView", th.getMessage());
BaseMBSplashNativeView.this.A.setImageBitmap(bitmap);
}
} catch (Throwable th2) {
af.b("MBSplashNativeView", th2.getMessage());
}
}
}
@Override // com.mbridge.msdk.foundation.same.c.c
public final void onFailedLoad(String str, String str2) {
BaseMBSplashNativeView.this.A.setVisibility(4);
}
});
} else {
baseMBSplashNativeView.A.setVisibility(4);
}
}
public static /* synthetic */ void b(BaseMBSplashNativeView baseMBSplashNativeView, boolean z) {
if (baseMBSplashNativeView.q.getSplashSignalCommunicationImpl() == null || baseMBSplashNativeView.q.getSplashSignalCommunicationImpl().a() == null) {
return;
}
baseMBSplashNativeView.q.getSplashSignalCommunicationImpl().a().a(z ? 2 : 1, baseMBSplashNativeView.F);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import com.mbridge.msdk.shake.MBShakeView;
import com.mbridge.msdk.shake.b;
import com.mbridge.msdk.splash.a.c;
/* loaded from: classes4.dex */
public class MBSplashNativeView extends BaseMBSplashNativeView {
public MBSplashNativeView(Context context) {
super(context);
}
public MBSplashNativeView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public MBSplashNativeView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
public MBSplashNativeView(Context context, MBSplashView mBSplashView, c cVar) {
super(context, mBSplashView, cVar);
}
@Override // com.mbridge.msdk.splash.view.BaseMBSplashNativeView
public final void a() {
this.b.setVisibility(8);
}
@Override // com.mbridge.msdk.splash.view.BaseMBSplashNativeView
public final void b() {
if (this.j == 1) {
MBShakeView mBShakeView = new MBShakeView(getContext());
this.s = mBShakeView;
mBShakeView.initView(this.r.getAdCall());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
layoutParams.addRule(13);
this.s.setLayoutParams(layoutParams);
addView(this.s);
this.g.setVisibility(4);
this.g.setEnabled(false);
this.s.setOnClickListener(new View.OnClickListener() { // from class: com.mbridge.msdk.splash.view.MBSplashNativeView.1
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
MBSplashNativeView.this.a(0);
}
});
this.t = new b(this.k, this.l * 1000) { // from class: com.mbridge.msdk.splash.view.MBSplashNativeView.2
@Override // com.mbridge.msdk.shake.b
public final void a() {
MBSplashNativeView mBSplashNativeView = MBSplashNativeView.this;
if (mBSplashNativeView.o || mBSplashNativeView.n) {
return;
}
mBSplashNativeView.a(4);
com.mbridge.msdk.shake.a.a().b(this);
}
};
}
}
}

View File

@@ -0,0 +1,38 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import android.util.AttributeSet;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.splash.d.d;
import com.mbridge.msdk.splash.view.BaseSplashPopView;
/* loaded from: classes4.dex */
public class MBSplashPopView extends BaseSplashPopView {
public MBSplashPopView(Context context, BaseSplashPopView.a aVar, d dVar) {
super(context, aVar, dVar);
}
public MBSplashPopView(Context context) {
super(context);
}
public MBSplashPopView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBSplashPopView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@RequiresApi(api = 21)
public MBSplashPopView(Context context, AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
}
@Override // com.mbridge.msdk.splash.view.BaseSplashPopView
public final void a(CampaignEx campaignEx) {
super.a(campaignEx);
b(campaignEx);
}
}

View File

@@ -0,0 +1,468 @@
package com.mbridge.msdk.splash.view;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.util.Base64;
import android.view.MotionEvent;
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.dycreator.listener.DyCountDownListener;
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.foundation.tools.at;
import com.mbridge.msdk.foundation.tools.s;
import com.mbridge.msdk.mbsignalcommon.windvane.g;
import com.mbridge.msdk.newreward.player.view.hybrid.util.MRAIDCommunicatorUtil;
import com.mbridge.msdk.splash.signal.c;
import com.mbridge.msdk.splash.signal.d;
import java.util.HashMap;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class MBSplashView extends RelativeLayout {
private static String a = "MBSplashView";
private int b;
private MBSplashWebview c;
private a d;
private ViewGroup e;
private View f;
private View g;
private int h;
private boolean i;
private boolean j;
private boolean k;
private ViewGroup l;
private View m;
private boolean n;
private boolean o;
private RelativeLayout.LayoutParams p;
private c q;
private DyCountDownListener r;
public void clearResState() {
this.k = false;
this.j = false;
this.i = false;
}
public View getCloseView() {
return this.f;
}
public ViewGroup getDevContainer() {
return this.l;
}
public View getIconVg() {
return this.g;
}
public c getSplashSignalCommunicationImpl() {
return this.q;
}
public MBSplashWebview getSplashWebview() {
return this.c;
}
public boolean isAttach() {
return this.o;
}
public boolean isDynamicView() {
return this.n;
}
public boolean isH5Ready() {
return this.i;
}
public boolean isImageReady() {
return this.k;
}
public boolean isVideoReady() {
return this.j;
}
public void resetLoadState() {
this.j = false;
this.i = false;
}
public void setDevContainer(ViewGroup viewGroup) {
this.l = viewGroup;
}
public void setDyCountDownListener(DyCountDownListener dyCountDownListener) {
this.r = dyCountDownListener;
}
public void setDynamicView(boolean z) {
this.n = z;
}
public void setH5Ready(boolean z) {
this.i = z;
}
public void setIconVg(View view, RelativeLayout.LayoutParams layoutParams) {
this.g = view;
this.p = layoutParams;
}
public void setImageReady(boolean z) {
this.k = z;
}
public void setSplashNativeView(View view) {
if (view != null) {
this.m = view;
}
}
public void setVideoReady(boolean z) {
this.j = z;
}
public void setSplashSignalCommunicationImpl(c cVar) {
this.q = cVar;
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setObject(cVar);
}
}
public MBSplashView(Context context) {
this(context, null);
}
public MBSplashView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public MBSplashView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
b();
}
@Override // android.view.View
public void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
b();
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.o = true;
}
private void b() {
setBackgroundColor(0);
this.b = getResources().getConfiguration().orientation;
}
public void setSplashWebView() {
if (this.c == null) {
try {
MBSplashWebview mBSplashWebview = new MBSplashWebview(getContext());
this.c = mBSplashWebview;
c cVar = this.q;
if (cVar != null) {
mBSplashWebview.setObject(cVar);
}
a aVar = this.d;
if (aVar != null) {
this.c.setWebViewClient(aVar);
return;
}
a aVar2 = new a();
this.d = aVar2;
this.c.setWebViewClient(aVar2);
} catch (Throwable th) {
af.b(a, th.getMessage());
}
}
}
public void changeCloseBtnState(int i) {
View view = this.f;
if (view != null) {
if (i == 2) {
view.setVisibility(8);
} else {
view.setVisibility(0);
}
}
}
public void setCloseView(View view) {
this.f = view;
if (view != null) {
view.setContentDescription("closeButton");
}
}
public void show() {
View view;
View view2;
View view3;
ViewGroup viewGroup;
com.mbridge.msdk.splash.d.a a2;
if (this.q != null && (viewGroup = this.l) != null && (viewGroup.getContext() instanceof Activity)) {
this.q.a(this.l.getContext());
a aVar = this.d;
if (aVar != null && (a2 = this.q.a()) != null) {
aVar.a = a2;
}
}
if (this.g != null) {
if (this.e == null) {
RelativeLayout relativeLayout = new RelativeLayout(getContext());
this.e = relativeLayout;
relativeLayout.setId(2147482647);
}
if (this.b == 2) {
this.h = ak.f(getContext());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(0, this.e.getId());
if (this.n && (view2 = this.m) != null) {
if (view2.getParent() != null) {
at.a(this.m);
}
addView(this.m, layoutParams);
} else {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null && mBSplashWebview.getParent() == null) {
addView(this.c, layoutParams);
}
c();
}
ViewGroup viewGroup2 = this.e;
if (viewGroup2 != null && viewGroup2.getParent() == null) {
int i = this.p.width;
at.a(this.g);
int i2 = this.h;
if (i > i2 / 4) {
i = i2 / 4;
}
this.e.addView(this.g, i, -1);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, -1);
layoutParams2.addRule(11);
layoutParams2.addRule(13);
addView(this.e, layoutParams2);
}
} else {
this.h = ak.e(getContext());
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams3.addRule(2, this.e.getId());
if (this.n && (view = this.m) != null) {
if (view.getParent() != null) {
at.a(this.m);
}
addView(this.m, layoutParams3);
} else {
MBSplashWebview mBSplashWebview2 = this.c;
if (mBSplashWebview2 != null && mBSplashWebview2.getParent() == null) {
addView(this.c, layoutParams3);
}
c();
}
ViewGroup viewGroup3 = this.e;
if (viewGroup3 != null && viewGroup3.getParent() == null) {
int i3 = this.p.height;
int i4 = this.h;
if (i3 > i4 / 4) {
i3 = i4 / 4;
}
at.a(this.g);
this.e.addView(this.g, -1, i3);
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(-1, i3);
layoutParams4.addRule(12);
addView(this.e, layoutParams4);
}
}
} else if (this.n && (view3 = this.m) != null) {
if (view3.getParent() != null) {
at.a(this.m);
}
addView(this.m, new ViewGroup.LayoutParams(-1, -1));
} else {
MBSplashWebview mBSplashWebview3 = this.c;
if (mBSplashWebview3 != null && mBSplashWebview3.getParent() == null) {
addView(this.c, new ViewGroup.LayoutParams(-1, -1));
}
c();
}
View view4 = this.f;
if (view4 != null) {
if (view4.getParent() == null) {
RelativeLayout.LayoutParams layoutParams5 = new RelativeLayout.LayoutParams(ak.a(getContext(), 100.0f), ak.a(getContext(), 30.0f));
layoutParams5.addRule(10);
layoutParams5.addRule(11);
layoutParams5.rightMargin = ak.a(getContext(), 10.0f);
layoutParams5.topMargin = ak.a(getContext(), 10.0f);
addView(this.f, layoutParams5);
} else {
bringChildToFront(this.f);
}
}
clearResState();
}
public void updateCountdown(int i) {
DyCountDownListener dyCountDownListener;
View view;
if (this.c != null && !this.n) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("countdown", i);
g.a().a((WebView) this.c, "updateCountdown", Base64.encodeToString(jSONObject.toString().getBytes(), 2));
} catch (JSONException e) {
e.printStackTrace();
}
}
if (this.n && (view = this.m) != null && (view instanceof MBSplashNativeView)) {
((MBSplashNativeView) view).updateCountDown(i);
}
if (!this.n || (dyCountDownListener = this.r) == null) {
return;
}
dyCountDownListener.getCountDownValue(i);
}
private void c() {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setObject(this.q);
this.c.post(new Runnable() { // from class: com.mbridge.msdk.splash.view.MBSplashView.1
@Override // java.lang.Runnable
public final void run() {
try {
af.a(MBSplashView.a, "webviewshow");
String str = "";
try {
int[] iArr = new int[2];
MBSplashView.this.c.getLocationOnScreen(iArr);
af.b(MBSplashView.a, "coordinate:" + iArr[0] + "--" + iArr[1]);
JSONObject jSONObject = new JSONObject();
jSONObject.put("startX", ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), (float) iArr[0]));
jSONObject.put("startY", ak.b(com.mbridge.msdk.foundation.controller.c.m().c(), (float) iArr[1]));
str = jSONObject.toString();
} catch (Throwable th) {
af.b(MBSplashView.a, th.getMessage(), th);
}
int[] iArr2 = new int[2];
MBSplashView.this.c.getLocationInWindow(iArr2);
MBSplashView.transInfoForMraid(MBSplashView.this.c, iArr2[0], iArr2[1], MBSplashView.this.c.getWidth(), MBSplashView.this.c.getHeight());
g.a().a((WebView) MBSplashView.this.c, "webviewshow", Base64.encodeToString(str.toString().getBytes(), 2));
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}
public static void transInfoForMraid(WebView webView, int i, int i2, int i3, int i4) {
af.b(a, "transInfoForMraid");
try {
int i5 = com.mbridge.msdk.foundation.controller.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(com.mbridge.msdk.foundation.controller.c.m().c());
float h = ab.h(com.mbridge.msdk.foundation.controller.c.m().c());
HashMap i6 = ab.i(com.mbridge.msdk.foundation.controller.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, "Interstitial");
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 onResume() {
View view = this.m;
if (view == null || !(view instanceof MBSplashNativeView)) {
return;
}
((MBSplashNativeView) view).setIsPause(false);
}
public void onPause() {
View view = this.m;
if (view == null || !(view instanceof MBSplashNativeView)) {
return;
}
((MBSplashNativeView) view).setIsPause(true);
}
public void setNotchPadding(int i, int i2, int i3, int i4) {
View view = this.m;
if (view != null && (view instanceof MBSplashNativeView)) {
((MBSplashNativeView) view).setNotchPadding(i, i2, i3, i4);
}
if (this.c != null) {
g.a().a((WebView) this.c, "oncutoutfetched", Base64.encodeToString(s.a(-999, i, i2, i3, i4).getBytes(), 0));
}
}
@SuppressLint({"ClickableViewAccessibility"})
public void setAllowClickSplash(final boolean z) {
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview != null) {
mBSplashWebview.setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.splash.view.MBSplashView.2
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
return !z;
}
});
}
setOnTouchListener(new View.OnTouchListener() { // from class: com.mbridge.msdk.splash.view.MBSplashView.3
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
return !z;
}
});
}
public void destroy() {
removeAllViews();
ViewGroup viewGroup = this.l;
if (viewGroup != null) {
viewGroup.removeAllViews();
}
MBSplashWebview mBSplashWebview = this.c;
if (mBSplashWebview == null || mBSplashWebview.isDestoryed()) {
return;
}
this.c.finishAdSession();
d.a(this.c, "onSystemDestory", "");
this.c.release();
this.c = null;
}
}

View File

@@ -0,0 +1,47 @@
package com.mbridge.msdk.splash.view;
import android.content.Context;
import com.iab.omid.library.mmadbridge.adsession.AdSession;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
/* loaded from: classes4.dex */
public class MBSplashWebview extends WindVaneWebView {
private static final String e = "MBSplashWebview";
private String f;
private AdSession g;
public AdSession getAdSession() {
return this.g;
}
public String getRequestId() {
return this.f;
}
public void setAdSession(AdSession adSession) {
this.g = adSession;
}
public void setRequestId(String str) {
this.f = str;
}
public MBSplashWebview(Context context) {
super(context);
setBackgroundColor(0);
}
public void finishAdSession() {
try {
AdSession adSession = this.g;
if (adSession != null) {
adSession.finish();
this.g = null;
af.a("OMSDK", "finish adSession");
}
} catch (Exception e2) {
af.a("OMSDK", e2.getMessage());
}
}
}

View File

@@ -0,0 +1,48 @@
package com.mbridge.msdk.splash.view;
import android.graphics.Bitmap;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import com.mbridge.msdk.foundation.tools.af;
import com.mbridge.msdk.mbsignalcommon.base.b;
import com.mbridge.msdk.mbsignalcommon.windvane.WindVaneWebView;
import com.mbridge.msdk.splash.signal.c;
/* loaded from: classes4.dex */
public final class a extends b {
com.mbridge.msdk.splash.d.a a;
private final String b = "SplashWebViewClient";
@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.splash.view.a.1
@Override // android.webkit.ValueCallback
public final /* bridge */ /* synthetic */ void onReceiveValue(String str2) {
}
});
} catch (Throwable th) {
af.b("SplashWebViewClient", "onPageStarted", th);
}
}
@Override // com.mbridge.msdk.mbsignalcommon.base.b, android.webkit.WebViewClient
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
try {
WindVaneWebView windVaneWebView = (WindVaneWebView) webView;
if (System.currentTimeMillis() - windVaneWebView.lastTouchTime > com.mbridge.msdk.click.b.a.c && com.mbridge.msdk.click.b.a.a(((c) windVaneWebView.getObject()).b().get(0), windVaneWebView.getUrl(), com.mbridge.msdk.click.b.a.b)) {
return false;
}
com.mbridge.msdk.splash.d.a aVar = this.a;
if (aVar == null) {
return true;
}
aVar.a(false, str);
return true;
} catch (Throwable th) {
af.b("SplashWebViewClient", "shouldOverrideUrlLoading", th);
return false;
}
}
}

View File

@@ -0,0 +1,37 @@
package com.mbridge.msdk.splash.view.nativeview;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
/* loaded from: classes4.dex */
public class MBNoRecycledCrashImageView extends ImageView {
public MBNoRecycledCrashImageView(Context context) {
super(context);
}
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
}
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
}
@RequiresApi(api = 21)
public MBNoRecycledCrashImageView(Context context, @Nullable AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
}
@Override // android.widget.ImageView, android.view.View
public void onDraw(Canvas canvas) {
try {
super.onDraw(canvas);
} catch (RuntimeException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,376 @@
package com.mbridge.msdk.splash.view.nativeview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
import android.graphics.RectF;
import android.graphics.drawable.GradientDrawable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.animation.Animation;
import android.view.animation.ScaleAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import com.mbridge.msdk.foundation.controller.c;
import com.mbridge.msdk.foundation.tools.ak;
/* loaded from: classes4.dex */
public class MBSplashClickView extends RelativeLayout {
public final int TYPE_SPLASH_BTN_CLICK;
public final int TYPE_SPLASH_BTN_GO;
public final int TYPE_SPLASH_BTN_OPEN;
private final String a;
private final String b;
private final String c;
private final String d;
private final String e;
private final String f;
private final String g;
private final String h;
private final String i;
private final String j;
private final String k;
private String l;
private int m;
private ImageView n;
private ImageView o;
private final RectF p;
private final Paint q;
private final Paint r;
public MBSplashClickView(Context context) {
super(context);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
public MBSplashClickView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
public MBSplashClickView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
a();
}
@RequiresApi(api = 21)
public MBSplashClickView(Context context, AttributeSet attributeSet, int i, int i2) {
super(context, attributeSet, i, i2);
this.a = "浏览第三方应用";
this.b = "View";
this.c = "打开第三方应用";
this.d = "Open";
this.e = "下载第三方应用";
this.f = "Install";
this.g = "mbridge_splash_btn_arrow_right";
this.h = "mbridge_splash_btn_circle";
this.i = "mbridge_splash_btn_finger";
this.j = "mbridge_splash_btn_go";
this.k = "mbridge_splash_btn_light";
this.TYPE_SPLASH_BTN_OPEN = 1;
this.TYPE_SPLASH_BTN_GO = 2;
this.TYPE_SPLASH_BTN_CLICK = 3;
this.p = new RectF();
this.q = new Paint();
this.r = new Paint();
}
private void a() {
this.q.setAntiAlias(true);
this.q.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
this.r.setAntiAlias(true);
this.r.setColor(-1);
}
@Override // android.widget.RelativeLayout, android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
super.onLayout(z, i, i2, i3, i4);
this.p.set(0.0f, 0.0f, getWidth(), getHeight());
}
@Override // android.view.View
public void draw(Canvas canvas) {
canvas.saveLayer(this.p, this.r, 31);
canvas.drawRoundRect(this.p, 200.0f, 200.0f, this.r);
canvas.saveLayer(this.p, this.q, 31);
super.draw(canvas);
canvas.restore();
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
int i = this.m;
if (i == 2) {
ScaleAnimation scaleAnimation = new ScaleAnimation(0.8f, 1.0f, 0.8f, 1.0f, 1, 0.5f, 1, 0.5f);
scaleAnimation.setDuration(500L);
scaleAnimation.setRepeatCount(-1);
scaleAnimation.setRepeatMode(2);
this.n.startAnimation(scaleAnimation);
return;
}
if (i == 1) {
TranslateAnimation translateAnimation = new TranslateAnimation(0, -100.0f, 0, 1000.0f, 0, 0.0f, 0, 0.0f);
translateAnimation.setDuration(1000L);
translateAnimation.setAnimationListener(new Animation.AnimationListener() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.3
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationRepeat(Animation animation) {
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationStart(Animation animation) {
MBSplashClickView.this.n.setVisibility(0);
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationEnd(final Animation animation) {
MBSplashClickView.this.n.setVisibility(4);
MBSplashClickView.this.n.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.3.1
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.n.startAnimation(animation);
}
}, 2000L);
}
});
this.n.startAnimation(translateAnimation);
return;
}
if (i == 3) {
ScaleAnimation scaleAnimation2 = new ScaleAnimation(1.0f, 0.7f, 1.0f, 0.7f, 1, 0.5f, 1, 0.5f);
scaleAnimation2.setDuration(400L);
scaleAnimation2.setRepeatCount(-1);
scaleAnimation2.setRepeatMode(2);
final ScaleAnimation scaleAnimation3 = new ScaleAnimation(0.0f, 0.5f, 0.0f, 0.5f, 1, 0.5f, 1, 0.5f);
scaleAnimation3.setDuration(200L);
scaleAnimation3.setAnimationListener(new Animation.AnimationListener() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.1
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationRepeat(Animation animation) {
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationStart(Animation animation) {
MBSplashClickView.this.o.setVisibility(0);
}
@Override // android.view.animation.Animation.AnimationListener
public final void onAnimationEnd(Animation animation) {
MBSplashClickView.this.o.setVisibility(4);
MBSplashClickView.this.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.1.1
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.o.startAnimation(scaleAnimation3);
}
}, 700L);
}
});
this.o.setVisibility(4);
this.n.startAnimation(scaleAnimation2);
this.o.postDelayed(new Runnable() { // from class: com.mbridge.msdk.splash.view.nativeview.MBSplashClickView.2
@Override // java.lang.Runnable
public final void run() {
MBSplashClickView.this.o.startAnimation(scaleAnimation3);
}
}, 500L);
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public void initView(String str) {
char c;
RelativeLayout.LayoutParams layoutParams;
this.l = str;
str.hashCode();
int i = 0;
switch (str.hashCode()) {
case -672744069:
if (str.equals("Install")) {
c = 0;
break;
}
c = 65535;
break;
case 2464362:
if (str.equals("Open")) {
c = 1;
break;
}
c = 65535;
break;
case 2666181:
if (str.equals("View")) {
c = 2;
break;
}
c = 65535;
break;
case 855294846:
if (str.equals("下载第三方应用")) {
c = 3;
break;
}
c = 65535;
break;
case 1383132195:
if (str.equals("打开第三方应用")) {
c = 4;
break;
}
c = 65535;
break;
case 1681333335:
if (str.equals("浏览第三方应用")) {
c = 5;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
case 3:
this.m = 3;
break;
case 1:
case 4:
this.m = 1;
break;
case 2:
case 5:
this.m = 2;
break;
default:
boolean contains = getContext().getResources().getConfiguration().locale.getLanguage().contains("zh");
if (TextUtils.isEmpty(this.l)) {
this.l = contains ? "浏览第三方应用" : "View";
}
this.m = 2;
break;
}
int i2 = this.m;
int parseColor = Color.parseColor("#666666");
int parseColor2 = Color.parseColor("#8FC31F");
int parseColor3 = Color.parseColor("#000000");
GradientDrawable gradientDrawable = new GradientDrawable();
if (i2 == 2) {
gradientDrawable.setColor(parseColor2);
} else {
gradientDrawable.setColor(parseColor3);
gradientDrawable.setStroke(2, parseColor);
}
gradientDrawable.setCornerRadius(200);
setBackground(gradientDrawable);
TextView textView = new TextView(getContext());
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(-1, -1);
layoutParams2.addRule(15);
textView.setLayoutParams(layoutParams2);
textView.setGravity(17);
textView.setTextSize(20.0f);
textView.setTextColor(-1);
textView.setText(this.l);
this.n = new ImageView(getContext());
int i3 = this.m;
if (i3 == 2) {
i = getResources().getIdentifier("mbridge_splash_btn_go", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 35.0f), ak.a(getContext(), 35.0f));
layoutParams.addRule(11);
layoutParams.addRule(15);
layoutParams.rightMargin = ak.a(getContext(), 10.0f);
} else if (i3 == 1) {
i = getResources().getIdentifier("mbridge_splash_btn_light", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(-2, -1);
layoutParams.leftMargin = 20;
layoutParams.rightMargin = 20;
ImageView imageView = new ImageView(getContext());
RelativeLayout.LayoutParams layoutParams3 = new RelativeLayout.LayoutParams(-2, -1);
layoutParams3.addRule(11);
layoutParams3.addRule(15);
layoutParams3.rightMargin = ak.a(getContext(), 50.0f);
imageView.setImageResource(getResources().getIdentifier("mbridge_splash_btn_arrow_right", "drawable", c.m().g()));
imageView.setScaleType(ImageView.ScaleType.CENTER);
imageView.setLayoutParams(layoutParams3);
addView(imageView);
} else if (i3 == 3) {
i = getResources().getIdentifier("mbridge_splash_btn_finger", "drawable", c.m().g());
layoutParams = new RelativeLayout.LayoutParams(ak.a(getContext(), 25.0f), ak.a(getContext(), 25.0f));
layoutParams.addRule(11);
layoutParams.rightMargin = ak.a(getContext(), 50.0f);
layoutParams.topMargin = ak.a(getContext(), 18.0f);
this.o = new ImageView(getContext());
RelativeLayout.LayoutParams layoutParams4 = new RelativeLayout.LayoutParams(ak.a(getContext(), 30.0f), ak.a(getContext(), 30.0f));
layoutParams4.addRule(11);
layoutParams4.rightMargin = ak.a(getContext(), 50.0f);
layoutParams4.topMargin = ak.a(getContext(), 5.0f);
this.o.setLayoutParams(layoutParams4);
this.o.setImageResource(getResources().getIdentifier("mbridge_splash_btn_circle", "drawable", c.m().g()));
addView(this.o);
} else {
layoutParams = null;
}
this.n.setLayoutParams(layoutParams);
this.n.setImageResource(i);
addView(textView);
addView(this.n);
invalidate();
}
}

View File

@@ -0,0 +1,8 @@
package com.mbridge.msdk.splash.view.nativeview;
/* loaded from: classes4.dex */
public interface a {
void a();
void b();
}