Pixel Fusion v1.0.3版本的 MD5 值为:e0cc7f5615caec50798ef549b679d557
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.mbridge.msdk.foundation.webview;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.webkit.WebView;
import com.google.android.exoplayer2.C;
import com.mbridge.msdk.c.g;
import com.mbridge.msdk.c.h;
import com.mbridge.msdk.c.i;
import com.mbridge.msdk.click.BbdcDCacCa;
import com.mbridge.msdk.click.entity.JumpLoaderResult;
import com.mbridge.msdk.foundation.entity.CampaignEx;
import com.mbridge.msdk.foundation.tools.ad;
import com.mbridge.msdk.foundation.tools.ah;
import com.mbridge.msdk.foundation.webview.BrowserView;
import com.mbridge.msdk.out.BaseTrackingListener;
import java.util.ArrayList;
public class a implements BrowserView.a {
private static String f52164a = "a";
private int b;
private String d;
private boolean e;
private BaseTrackingListener f;
private BrowserView g;
private CampaignEx h;
private com.mbridge.msdk.click.a i;
private Context j;
private JumpLoaderResult l;
private long o;
private boolean c = true;
private boolean m = false;
private final Runnable n = new Runnable() {
@Override
public final void run() {
ad.b(a.f52164a, "webview js!超时上限:" + a.this.b + "ms");
if (a.this.i != null && a.this.l != null) {
a.this.l.setSuccess(false);
a.this.l.setUrl(a.this.d);
a.this.l.setType(2);
a.this.l.setExceptionMsg("linktype 8 time out");
a.this.i.a(a.this.l, a.this.h, 1, false);
}
a aVar = a.this;
if (aVar.d(null, aVar.d) && !a.this.m) {
a.this.m = true;
a aVar2 = a.this;
aVar2.a(aVar2.j, a.this.d, a.this.h);
}
if (a.this.f != null) {
a.this.f.onFinishRedirection(a.this.h, a.this.d);
}
}
};
private Handler k = new Handler(Looper.getMainLooper());
public a(Context context, CampaignEx campaignEx, com.mbridge.msdk.click.a aVar, BrowserView browserView, BaseTrackingListener baseTrackingListener) {
this.b = 10000;
this.l = null;
this.j = context;
this.h = campaignEx;
this.g = browserView;
this.f = baseTrackingListener;
g BbdcDCacCa2 = BbdcDCacCa.BbdcDCacCa(h.a());
if (BbdcDCacCa2 == null) {
h.a();
BbdcDCacCa2 = i.a();
}
this.i = aVar;
this.l = new JumpLoaderResult();
this.b = (int) BbdcDCacCa2.aq();
}
@Override
public final void a() {
}
public boolean d(WebView webView, String str) {
boolean z;
boolean z2;
try {
if (TextUtils.isEmpty(str)) {
return true;
}
Uri parse = Uri.parse(str);
if (!parse.getScheme().equals("http") && !parse.getScheme().equals("https")) {
z = false;
if (!z) {
return true;
}
if (parse.getScheme().equals("intent")) {
Intent parseUri = Intent.parseUri(str, 1);
try {
String str2 = parseUri.getPackage();
if (!TextUtils.isEmpty(str2)) {
if (this.j.getPackageManager().getLaunchIntentForPackage(str2) != null) {
return false;
}
}
} catch (Throwable th) {
ad.b(f52164a, th.getMessage());
}
try {
String stringExtra = parseUri.getStringExtra("browser_fallback_url");
if (!TextUtils.isEmpty(stringExtra)) {
Uri parse2 = Uri.parse(str);
if (!parse2.getScheme().equals("http")) {
if (!parse2.getScheme().equals("https")) {
z2 = false;
if (!z2) {
return true;
}
str = stringExtra;
}
}
z2 = true;
if (!z2) {
}
}
} catch (Throwable th2) {
ad.b(f52164a, th2.getMessage());
}
}
if (!com.mbridge.msdk.click.c.d(this.j, str)) {
return true;
}
ad.b(f52164a, "openDeepLink");
return false;
}
z = true;
if (!z) {
}
} catch (Throwable th3) {
ad.b(f52164a, th3.getMessage());
return true;
}
}
private boolean e(WebView webView, String str) {
boolean z;
boolean z2;
try {
if (TextUtils.isEmpty(str)) {
return false;
}
Uri parse = Uri.parse(str);
if (!parse.getScheme().equals("http") && !parse.getScheme().equals("https")) {
z = false;
if (!z) {
return false;
}
if (parse.getScheme().equals("intent")) {
Intent parseUri = Intent.parseUri(str, 1);
try {
String str2 = parseUri.getPackage();
if (!TextUtils.isEmpty(str2) && this.j.getPackageManager().getLaunchIntentForPackage(str2) != null) {
parseUri.setFlags(268435456);
this.j.startActivity(parseUri);
this.m = true;
return true;
}
} catch (Throwable th) {
ad.b(f52164a, th.getMessage());
}
try {
String stringExtra = parseUri.getStringExtra("browser_fallback_url");
if (!TextUtils.isEmpty(stringExtra)) {
Uri parse2 = Uri.parse(str);
if (!parse2.getScheme().equals("http") && !parse2.getScheme().equals("https")) {
z2 = false;
if (!z2) {
webView.loadUrl(stringExtra);
return false;
}
str = stringExtra;
}
z2 = true;
if (!z2) {
}
}
} catch (Throwable th2) {
ad.b(f52164a, th2.getMessage());
}
}
if (!com.mbridge.msdk.click.c.d(this.j, str)) {
return false;
}
ad.b(f52164a, "openDeepLink");
this.m = true;
return true;
}
z = true;
if (!z) {
}
} catch (Throwable th3) {
ad.b(f52164a, th3.getMessage());
return false;
}
}
@Override
public final void c(WebView webView, final String str) {
com.mbridge.msdk.activity.BbdcDCacCa.BbdcDCacCa("onPageFinished1 ", str, f52164a);
if (this.c) {
this.o = 0L;
this.c = false;
com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
@Override
public final void run() {
if (a.this.f != null) {
a.this.f.onFinishRedirection(a.this.h, str);
}
if (a.this.i != null && a.this.l != null) {
a.this.l.setSuccess(true);
a.this.l.setUrl(str);
a.this.l.setType(2);
a.this.i.a(a.this.l, a.this.h, 1, true);
}
}
});
if (TextUtils.isEmpty(str)) {
return;
}
c();
Uri parse = Uri.parse(str);
if (!(parse.getScheme().equals("http") || parse.getScheme().equals("https")) || this.m) {
return;
}
this.m = true;
a(this.j, str, this.h);
}
}
@Override
public final boolean b(WebView webView, final String str) {
com.mbridge.msdk.activity.BbdcDCacCa.BbdcDCacCa("shouldOverrideUrlLoading1 ", str, f52164a);
this.c = false;
if (ah.a.b(str) && ah.a.a(this.j, str, null)) {
this.m = true;
}
boolean e = e(webView, str);
if (e) {
this.o = 0L;
this.c = false;
c();
com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
@Override
public final void run() {
if (a.this.i != null && a.this.l != null) {
a.this.l.setSuccess(true);
a.this.l.setUrl(str);
a.this.l.setType(2);
a.this.i.a(a.this.l, a.this.h, 1, true);
}
if (a.this.f != null) {
a.this.f.onFinishRedirection(a.this.h, str);
}
}
});
}
return e;
}
@Override
public final void a(WebView webView, String str) {
if (this.o == 0) {
this.o = System.currentTimeMillis();
if (!this.e) {
this.e = true;
d();
}
}
this.d = str;
this.c = true;
}
@Override
public final void a(WebView webView, String str, Bitmap bitmap) {
if (this.o == 0) {
this.o = System.currentTimeMillis();
if (!this.e) {
this.e = true;
d();
}
this.m = false;
}
this.d = str;
this.c = true;
}
private void d() {
this.k.postDelayed(this.n, this.b);
}
private void c() {
this.k.removeCallbacks(this.n);
}
@Override
public final void a(WebView webView, int i, final String str, final String str2) {
ad.d(f52164a, str);
c();
com.mbridge.msdk.foundation.same.f.b.g().execute(new Runnable() {
@Override
public final void run() {
if (a.this.f != null) {
a.this.f.onFinishRedirection(a.this.h, str2);
}
if (a.this.i != null && a.this.l != null) {
a.this.l.setSuccess(false);
a.this.l.setUrl(str2);
a.this.l.setType(2);
a.this.l.setExceptionMsg(str);
a.this.i.a(a.this.l, a.this.h, 1, true);
}
}
});
if (!d(webView, str2) || this.m) {
return;
}
this.m = true;
a(this.j, str2, this.h);
}
public void a(Context context, String str, CampaignEx campaignEx) {
if (context == null) {
return;
}
if (campaignEx != null) {
campaignEx.getCurrentLocalRid();
}
try {
Class.forName("com.mbridge.msdk.activity.MBCommonActivity");
Intent intent = new Intent(context, Class.forName("com.mbridge.msdk.activity.MBCommonActivity"));
if (TextUtils.isEmpty(str)) {
return;
}
b.f52169a.put(str, this.g);
if (ah.a.a(str)) {
str = "https://play.google.com/store/apps/details?id=" + str.replace("market://details?id=", "");
}
intent.putExtra("url", str);
ad.c("url", "webview url = " + str);
intent.setFlags(C.f37207BbDAc);
intent.putExtra("mvcommon", campaignEx);
context.startActivity(intent);
} catch (Exception unused) {
ah.a(context, str, this.f, campaignEx, new ArrayList());
}
}
}