Recover Files v1.3.9版本的 MD5 值为:27a8b2c239c6cb7111d74d6bb07d21b2
以下内容为反编译后的 l.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.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.foundation.same.report.p;
import com.mbridge.msdk.foundation.tools.aa;
import java.util.HashMap;
import w2.q;
public class l {
public static long f25392a = 0;
private static final String f25393d = "l";
boolean f25394b;
boolean f25395c;
private int f25396e;
private int f25397f;
private com.mbridge.msdk.c.e f25399h;
private a f25400i;
private String f25401j;
private String f25402k;
private WebView f25403l;
private boolean f25404m;
private String f25405n;
private int f25406o;
private boolean f25408q;
private boolean f25407p = false;
private final Runnable f25409r = new Runnable() {
@Override
public final void run() {
l.this.f25407p = true;
l.this.f25406o = 1;
l.m(l.this);
}
};
private final Runnable f25410s = new Runnable() {
@Override
public final void run() {
l.this.f25407p = true;
l.this.f25406o = 2;
l.m(l.this);
}
};
private Handler f25398g = new Handler(Looper.getMainLooper());
public interface a {
void a(int i10, String str, String str2, String str3);
void a(String str, boolean z10, String str2);
boolean a(String str);
boolean b(String str);
boolean c(String str);
}
public l() {
this.f25396e = 15000;
this.f25397f = 3000;
com.mbridge.msdk.c.e a10 = n.a(com.mbridge.msdk.c.f.a());
this.f25399h = a10;
if (a10 == null) {
this.f25399h = com.mbridge.msdk.c.f.a().b();
}
this.f25404m = this.f25399h.V();
this.f25396e = (int) this.f25399h.aa();
this.f25397f = (int) this.f25399h.aa();
}
public void c() {
this.f25398g.removeCallbacks(this.f25410s);
}
public static void e(l lVar) {
lVar.c();
lVar.f25398g.postDelayed(lVar.f25410s, lVar.f25396e);
}
public static void l(l lVar) {
lVar.d();
lVar.f25398g.postDelayed(lVar.f25409r, lVar.f25397f);
}
public static void m(l lVar) {
synchronized (f25393d) {
try {
try {
lVar.b();
lVar.f25403l.destroy();
a aVar = lVar.f25400i;
if (aVar != null) {
aVar.a(lVar.f25401j, lVar.f25407p, lVar.f25405n);
}
} finally {
}
} catch (Exception e10) {
aa.d(f25393d, e10.getMessage());
}
}
}
public static void c(l lVar) {
synchronized (f25393d) {
try {
lVar.b();
a aVar = lVar.f25400i;
if (aVar != null) {
aVar.a(lVar.f25401j, lVar.f25407p, lVar.f25405n);
}
} catch (Exception e10) {
aa.d(f25393d, e10.getMessage());
} catch (Throwable th2) {
aa.d(f25393d, th2.getMessage());
}
}
}
public void d() {
this.f25398g.removeCallbacks(this.f25409r);
}
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.f25402k = str4;
this.f25401j = str3;
this.f25400i = 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.f25401j = str3;
this.f25400i = 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.f25401j);
} else {
this.f25398g.post(new Runnable() {
@Override
public final void run() {
l lVar = l.this;
lVar.a(str, str2, context, lVar.f25401j);
}
});
}
}
public void a(String str, String str2, Context context, String str3) {
try {
a(context, str, str2);
if (!TextUtils.isEmpty(this.f25402k)) {
this.f25403l.getSettings().setDefaultTextEncodingName(q.f40313v);
this.f25397f = 2000;
this.f25396e = 2000;
aa.b(f25393d, this.f25402k);
this.f25403l.loadDataWithBaseURL(str3, this.f25402k, ce.b.f1340e, q.f40313v, str3);
return;
}
if (this.f25404m) {
HashMap hashMap = new HashMap();
if (this.f25403l.getUrl() != null) {
hashMap.put(w6.d.J, this.f25403l.getUrl());
}
this.f25403l.loadUrl(str3, hashMap);
return;
}
this.f25403l.loadUrl(str3);
} catch (Throwable th2) {
try {
a aVar = this.f25400i;
if (aVar != null) {
aVar.a(0, this.f25401j, th2.getMessage(), this.f25405n);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
private void a(final Context context, final String str, final String str2) {
WebView webView = new WebView(context);
this.f25403l = webView;
webView.getSettings().setJavaScriptEnabled(true);
this.f25403l.getSettings().setCacheMode(2);
this.f25403l.getSettings().setLoadsImagesAutomatically(false);
this.f25403l.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 e10) {
e10.printStackTrace();
}
}
@Override
public final void onPageStarted(WebView webView2, String str3, Bitmap bitmap) {
try {
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
if (l.this.f25408q) {
l.this.f25406o = 0;
l.c(l.this);
return;
}
l.this.f25395c = false;
if (webView2.getTag() == null) {
webView2.setTag("has_first_started");
} else {
l.this.f25394b = true;
}
synchronized (l.f25393d) {
l.this.f25401j = str3;
if (l.this.f25400i != null && l.this.f25400i.a(str3)) {
l.this.f25408q = true;
l.c(l.this);
} else {
l.e(l.this);
}
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
@Override
public final void onReceivedError(WebView webView2, int i10, String str3, String str4) {
synchronized (l.f25393d) {
l.this.f25408q = true;
l.this.b();
l.c(l.this);
}
if (l.this.f25400i != null) {
l.this.f25400i.a(i10, webView2.getUrl(), str3, l.this.f25405n);
}
}
@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 p(context).a(str, str2, webView2.getUrl());
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView2, String str3) {
synchronized (l.f25393d) {
l lVar = l.this;
lVar.f25395c = true;
lVar.d();
if (l.this.f25408q) {
l.this.c();
l.c(l.this);
return true;
}
l.this.f25401j = str3;
if (l.this.f25400i != null && l.this.f25400i.b(str3)) {
l.this.f25408q = true;
l.this.c();
l.c(l.this);
return true;
}
if (l.this.f25404m) {
HashMap hashMap = new HashMap();
if (l.this.f25403l.getUrl() != null) {
hashMap.put(w6.d.J, l.this.f25403l.getUrl());
}
l.this.f25403l.loadUrl(str3, hashMap);
} else {
l.this.f25403l.loadUrl(str3);
}
return true;
}
}
});
this.f25403l.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 i10) {
if (i10 == 100) {
try {
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
if (!l.this.f25408q) {
l lVar = l.this;
if (!lVar.f25395c) {
l.l(lVar);
}
}
if (l.this.f25400i != null) {
l.this.f25400i.c(webView2.getUrl());
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
});
}
}