正在查看: Cantique de Louanges v12 应用的 l.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 l.java JAVA 源代码文件
本页面展示 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 com.mbridge.msdk.playercommon.exoplayer2.DefaultLoadControl;
import java.util.HashMap;
import org.json.b4;
public class l {
public static long a = 0;
private static final String d = "l";
boolean b;
boolean c;
private int e;
private int f;
private com.mbridge.msdk.c.e 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() {
l.this.p = true;
l.this.o = 1;
l.m(l.this);
}
};
private final Runnable s = new Runnable() {
@Override
public final void run() {
l.this.p = true;
l.this.o = 2;
l.m(l.this);
}
};
private Handler g = new Handler(Looper.getMainLooper());
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 l() {
this.e = DefaultLoadControl.DEFAULT_MIN_BUFFER_MS;
this.f = 3000;
com.mbridge.msdk.c.e b = com.mbridge.msdk.c.f.a().b(com.mbridge.msdk.foundation.controller.b.d().h());
this.h = b;
if (b == null) {
this.h = com.mbridge.msdk.c.f.a().b();
}
this.m = this.h.V();
this.e = (int) this.h.aa();
this.f = (int) this.h.aa();
}
public void c() {
this.g.removeCallbacks(this.s);
}
static void e(l lVar) {
lVar.c();
lVar.g.postDelayed(lVar.s, lVar.e);
}
static void l(l lVar) {
lVar.d();
lVar.g.postDelayed(lVar.r, lVar.f);
}
static void m(l lVar) {
synchronized (d) {
try {
try {
lVar.b();
lVar.l.destroy();
a aVar = lVar.i;
if (aVar != null) {
aVar.a(lVar.j, lVar.p, lVar.n);
}
} finally {
}
} catch (Exception e) {
aa.d(d, e.getMessage());
}
}
}
static void c(l lVar) {
synchronized (d) {
try {
lVar.b();
a aVar = lVar.i;
if (aVar != null) {
aVar.a(lVar.j, lVar.p, lVar.n);
}
} catch (Exception e) {
aa.d(d, e.getMessage());
} catch (Throwable th) {
aa.d(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() {
l lVar = l.this;
lVar.a(str, str2, context, lVar.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(b4.L);
this.f = 2000;
this.e = 2000;
aa.b(d, this.k);
this.l.loadDataWithBaseURL(str3, this.k, "*/*", b4.L, str3);
return;
}
if (this.m) {
HashMap hashMap = new HashMap();
if (this.l.getUrl() != null) {
hashMap.put("Referer", 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 (l.this.q) {
l.this.o = 0;
l.c(l.this);
return;
}
l.this.c = false;
if (webView2.getTag() == null) {
webView2.setTag("has_first_started");
} else {
l.this.b = true;
}
synchronized (l.d) {
l.this.j = str3;
if (l.this.i == null || !l.this.i.a(str3)) {
l.e(l.this);
} else {
l.this.q = true;
l.c(l.this);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final void onReceivedError(WebView webView2, int i, String str3, String str4) {
synchronized (l.d) {
l.this.q = true;
l.this.b();
l.c(l.this);
}
if (l.this.i != null) {
l.this.i.a(i, webView2.getUrl(), str3, l.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)) {
return;
}
new p(context).a(str, str2, webView2.getUrl());
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView2, String str3) {
synchronized (l.d) {
l lVar = l.this;
lVar.c = true;
lVar.d();
if (l.this.q) {
l.this.c();
l.c(l.this);
return true;
}
l.this.j = str3;
if (l.this.i != null && l.this.i.b(str3)) {
l.this.q = true;
l.this.c();
l.c(l.this);
return true;
}
if (l.this.m) {
HashMap hashMap = new HashMap();
if (l.this.l.getUrl() != null) {
hashMap.put("Referer", l.this.l.getUrl());
}
l.this.l.loadUrl(str3, hashMap);
} else {
l.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 (!l.this.q) {
l lVar = l.this;
if (!lVar.c) {
l.l(lVar);
}
}
if (l.this.i != null) {
l.this.i.c(webView2.getUrl());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}
}