Pixel Fusion v1.0.2版本的 MD5 值为:7c04c460c2996569d4ad075cd671a946
以下内容为反编译后的 m.java 源代码,内容仅作参考
package com.mbridge.msdk.click;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.google.common.net.babbDABcB;
import com.json.r6;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.tools.ad;
import java.util.HashMap;
public class m {
public static long f63194a = 0;
private static final String d = "m";
boolean b;
boolean c;
private int e;
private int f;
private com.mbridge.msdk.c.g h;
private a i;
private String j;
private String k;
private WebView l;
private boolean m;
private String n;
private int o;
private boolean q;
private boolean p = false;
private final Runnable r = new Runnable() {
@Override
public final void run() {
m.this.p = true;
m.this.o = 1;
m.m(m.this);
}
};
private final Runnable s = new Runnable() {
@Override
public final void run() {
m.this.p = true;
m.this.o = 2;
m.m(m.this);
}
};
private Handler g = new Handler(Looper.getMainLooper());
public interface a {
void a(int i, String str, String str2, String str3);
void a(String str, boolean z, String str2);
boolean a(String str);
boolean b(String str);
boolean c(String str);
}
public m() {
this.e = 15000;
this.f = 3000;
com.mbridge.msdk.c.g BbdcDCacCa2 = BbdcDCacCa.BbdcDCacCa(com.mbridge.msdk.c.h.a());
this.h = BbdcDCacCa2;
if (BbdcDCacCa2 == null) {
com.mbridge.msdk.c.h.a();
this.h = com.mbridge.msdk.c.i.a();
}
this.m = this.h.aI();
this.e = (int) this.h.aq();
this.f = (int) this.h.aq();
}
public void c() {
this.g.removeCallbacks(this.s);
}
public static void e(m mVar) {
mVar.c();
mVar.g.postDelayed(mVar.s, mVar.e);
}
public static void l(m mVar) {
mVar.d();
mVar.g.postDelayed(mVar.r, mVar.f);
}
public static void m(m mVar) {
synchronized (d) {
try {
try {
mVar.b();
mVar.l.destroy();
a aVar = mVar.i;
if (aVar != null) {
aVar.a(mVar.j, mVar.p, mVar.n);
}
} finally {
}
} catch (Exception e) {
ad.b(d, e.getMessage());
}
}
}
public static void c(m mVar) {
synchronized (d) {
try {
mVar.b();
a aVar = mVar.i;
if (aVar != null) {
aVar.a(mVar.j, mVar.p, mVar.n);
}
} catch (Exception e) {
ad.b(d, e.getMessage());
} catch (Throwable th) {
ad.b(d, th.getMessage());
}
}
}
public void d() {
this.g.removeCallbacks(this.r);
}
public void b() {
d();
c();
}
public final void a(String str, String str2, Context context, String str3, String str4, a aVar) {
if (aVar != null) {
this.k = str4;
this.j = str3;
this.i = aVar;
a(str, str2, context);
return;
}
throw new NullPointerException("OverrideUrlLoadingListener can not be null");
}
public final void a(String str, String str2, Context context, String str3, a aVar) {
if (aVar != null) {
this.j = str3;
this.i = aVar;
a(str, str2, context);
return;
}
throw new NullPointerException("OverrideUrlLoadingListener can not be null");
}
private void a(final String str, final String str2, final Context context) {
if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
a(str, str2, context, this.j);
} else {
this.g.post(new Runnable() {
@Override
public final void run() {
m mVar = m.this;
mVar.a(str, str2, context, mVar.j);
}
});
}
}
public void a(String str, String str2, Context context, String str3) {
try {
a(context, str, str2);
if (!TextUtils.isEmpty(this.k)) {
this.l.getSettings().setDefaultTextEncodingName(r6.M);
this.f = 2000;
this.e = 2000;
ad.c(d, this.k);
this.l.loadDataWithBaseURL(str3, this.k, "*/*", r6.M, str3);
return;
}
if (this.m) {
HashMap hashMap = new HashMap();
if (this.l.getUrl() != null) {
hashMap.put(babbDABcB.f59206bdbBBaA, this.l.getUrl());
}
this.l.loadUrl(str3, hashMap);
return;
}
this.l.loadUrl(str3);
} catch (Throwable th) {
try {
a aVar = this.i;
if (aVar != null) {
aVar.a(0, this.j, th.getMessage(), this.n);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
private void a(final Context context, final String str, final String str2) {
WebView webView = new WebView(context);
this.l = webView;
webView.getSettings().setJavaScriptEnabled(true);
this.l.getSettings().setCacheMode(2);
this.l.getSettings().setLoadsImagesAutomatically(false);
this.l.setWebViewClient(new WebViewClient() {
@Override
public final void onPageFinished(WebView webView2, String str3) {
super.onPageFinished(webView2, str3);
try {
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final void onPageStarted(WebView webView2, String str3, Bitmap bitmap) {
try {
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
if (m.this.q) {
m.this.o = 0;
m.c(m.this);
return;
}
m.this.c = false;
if (webView2.getTag() == null) {
webView2.setTag("has_first_started");
} else {
m.this.b = true;
}
synchronized (m.d) {
m.this.j = str3;
if (m.this.i != null && m.this.i.a(str3)) {
m.this.q = true;
m.c(m.this);
} else {
m.e(m.this);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final void onReceivedError(WebView webView2, int i, String str3, String str4) {
synchronized (m.d) {
m.this.q = true;
m.this.b();
m.c(m.this);
}
if (m.this.i != null) {
m.this.i.a(i, webView2.getUrl(), str3, m.this.n);
}
}
@Override
public final void onReceivedSslError(WebView webView2, SslErrorHandler sslErrorHandler, SslError sslError) {
try {
if (MBridgeConstans.IS_SP_CBT_CF && sslErrorHandler != null) {
sslErrorHandler.cancel();
}
if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str)) {
new com.mbridge.msdk.foundation.same.report.o(context).a(str, str2, webView2.getUrl());
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final boolean onRenderProcessGone(WebView webView2, RenderProcessGoneDetail renderProcessGoneDetail) {
try {
synchronized (m.d) {
m.this.q = true;
m.this.b();
m.c(m.this);
}
if (m.this.i != null) {
m.this.i.a(-1, webView2.getUrl(), "WebView render process crash.", m.this.n);
}
if (webView2 != null) {
webView2.destroy();
}
return true;
} catch (Throwable th) {
ad.b(m.d, th.getMessage());
return true;
}
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView2, String str3) {
synchronized (m.d) {
m mVar = m.this;
mVar.c = true;
mVar.d();
if (m.this.q) {
m.this.c();
m.c(m.this);
return true;
}
m.this.j = str3;
if (m.this.i != null && m.this.i.b(str3)) {
m.this.q = true;
m.this.c();
m.c(m.this);
return true;
}
if (m.this.m) {
HashMap hashMap = new HashMap();
if (m.this.l.getUrl() != null) {
hashMap.put(babbDABcB.f59206bdbBBaA, m.this.l.getUrl());
}
m.this.l.loadUrl(str3, hashMap);
} else {
m.this.l.loadUrl(str3);
}
return true;
}
}
});
this.l.setWebChromeClient(new WebChromeClient() {
@Override
public final boolean onJsAlert(WebView webView2, String str3, String str4, JsResult jsResult) {
return true;
}
@Override
public final boolean onJsConfirm(WebView webView2, String str3, String str4, JsResult jsResult) {
return true;
}
@Override
public final boolean onJsPrompt(WebView webView2, String str3, String str4, String str5, JsPromptResult jsPromptResult) {
return true;
}
@Override
public final void onProgressChanged(WebView webView2, int i) {
if (i == 100) {
try {
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
if (!m.this.q) {
m mVar = m.this;
if (!mVar.c) {
m.l(mVar);
}
}
if (m.this.i != null) {
m.this.i.c(webView2.getUrl());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}
}