正在查看: Antivirus Cleaner v1.2.0.0 应用的 n0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 n0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.thinkup.expressad.m;
import android.annotation.SuppressLint;
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 java.util.HashMap;
public class n0 {
public static long o = 0;
private static final String o0 = "n0";
private static final int o00 = 1;
private static final int o0m = 0;
private static final int o0o = 2;
boolean m;
private com.thinkup.expressad.om.o m0;
private String mm;
private String mn;
private o mo;
boolean n;
private WebView n0;
private String nm;
private int nn;
private boolean no;
private int om;
private int oo;
private boolean oo0;
private boolean o0n = false;
private final Runnable ooo = new Runnable() {
@Override
public final void run() {
n0.nm(n0.this);
n0.this.nn = 1;
String unused = n0.o0;
int unused2 = n0.this.om;
n0.o00(n0.this);
}
};
private final Runnable oom = new Runnable() {
@Override
public final void run() {
n0.nm(n0.this);
n0.this.nn = 2;
String unused = n0.o0;
int unused2 = n0.this.oo;
n0.o00(n0.this);
}
};
private Handler on = new Handler(Looper.getMainLooper());
public interface o {
boolean m(String str);
void o(String str, String str2);
void o(String str, String str2, String str3);
boolean o();
boolean o(String str);
}
public n0() {
this.oo = 15000;
this.om = 3000;
com.thinkup.expressad.om.m.o();
com.thinkup.expressad.foundation.m.m.n().om();
com.thinkup.expressad.om.o m = com.thinkup.expressad.om.m.m();
this.m0 = m;
if (m == null) {
com.thinkup.expressad.om.m.o();
this.m0 = com.thinkup.expressad.om.m.n();
}
this.no = this.m0.ooo();
this.oo = (int) this.m0.o0o();
this.om = (int) this.m0.o0o();
}
private void n() {
synchronized (o0) {
try {
om();
this.n0.destroy();
o oVar = this.mo;
if (oVar != null) {
oVar.o(this.mm, this.nm);
}
} catch (Throwable unused) {
}
}
}
public static boolean nm(n0 n0Var) {
n0Var.o0n = true;
return true;
}
public static void no(n0 n0Var) {
n0Var.mm();
n0Var.on.postDelayed(n0Var.ooo, n0Var.om);
}
public static void o00(n0 n0Var) {
synchronized (o0) {
try {
n0Var.om();
n0Var.n0.destroy();
o oVar = n0Var.mo;
if (oVar != null) {
oVar.o(n0Var.mm, n0Var.nm);
}
} catch (Throwable unused) {
}
}
}
public void om() {
mm();
m0();
}
public static boolean oo(n0 n0Var) {
n0Var.oo0 = true;
return true;
}
private void m() {
synchronized (o0) {
try {
om();
o oVar = this.mo;
if (oVar != null) {
oVar.o(this.mm, this.nm);
}
} catch (Throwable unused) {
}
}
}
public void m0() {
this.on.removeCallbacks(this.oom);
}
public void mm() {
this.on.removeCallbacks(this.ooo);
}
private void mo() {
this.on.postDelayed(this.ooo, this.om);
}
private void o0() {
m0();
this.on.postDelayed(this.oom, this.oo);
}
private void on() {
this.on.postDelayed(this.oom, this.oo);
}
private void oo() {
mm();
this.on.postDelayed(this.ooo, this.om);
}
public static void om(n0 n0Var) {
n0Var.m0();
n0Var.on.postDelayed(n0Var.oom, n0Var.oo);
}
public final void o(String str, String str2, Context context, String str3, String str4, o oVar) {
if (oVar != null) {
this.mn = str4;
this.mm = str3;
this.mo = oVar;
o(str, str2, context);
return;
}
throw new NullPointerException("OverrideUrlLoadingListener can not be null");
}
public static void n(n0 n0Var) {
synchronized (o0) {
try {
n0Var.om();
o oVar = n0Var.mo;
if (oVar != null) {
oVar.o(n0Var.mm, n0Var.nm);
}
} catch (Throwable unused) {
}
}
}
public final void o(String str, String str2, Context context, String str3, o oVar) {
if (oVar != null) {
this.mm = str3;
this.mo = oVar;
o(str, str2, context);
return;
}
throw new NullPointerException("OverrideUrlLoadingListener can not be null");
}
private void o(final String str, final String str2, final Context context) {
if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
o(str, str2, context, this.mm);
} else {
this.on.post(new Runnable() {
@Override
public final void run() {
n0 n0Var = n0.this;
n0Var.o(str, str2, context, n0Var.mm);
}
});
}
}
public void o(String str, String str2, Context context, String str3) {
try {
o(context, str, str2);
if (!TextUtils.isEmpty(this.mn)) {
this.n0.getSettings().setDefaultTextEncodingName(com.thinkup.expressad.foundation.on.o.moo0);
this.om = 2000;
this.oo = 2000;
this.n0.loadDataWithBaseURL(str3, this.mn, "*/*", com.thinkup.expressad.foundation.on.o.moo0, str3);
return;
}
if (this.no) {
HashMap hashMap = new HashMap();
if (this.n0.getUrl() != null) {
hashMap.put("Referer", this.n0.getUrl());
}
this.n0.loadUrl(str3, hashMap);
return;
}
this.n0.loadUrl(str3);
} catch (Throwable th) {
try {
o oVar = this.mo;
if (oVar != null) {
oVar.o(this.mm, th.getMessage(), this.nm);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
@SuppressLint({"SetJavaScriptEnabled"})
private void o(Context context, final String str, final String str2) {
WebView webView = new WebView(context);
this.n0 = webView;
webView.getSettings().setJavaScriptEnabled(true);
this.n0.getSettings().setCacheMode(2);
this.n0.getSettings().setLoadsImagesAutomatically(false);
this.n0.setWebViewClient(new WebViewClient() {
private boolean o() {
n0 n0Var = n0.this;
return n0Var.m || n0Var.n;
}
@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 (n0.this.oo0) {
n0.this.nn = 0;
n0.n(n0.this);
return;
}
n0.this.n = false;
if (webView2.getTag() == null) {
webView2.setTag("has_first_started");
} else {
n0.this.m = true;
}
synchronized (n0.o0) {
try {
n0.this.mm = str3;
if (n0.this.mo == null || !n0.this.mo.o(str3)) {
n0.om(n0.this);
} else {
n0.oo(n0.this);
n0.n(n0.this);
}
} finally {
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final void onReceivedError(WebView webView2, int i, String str3, String str4) {
String unused = n0.o0;
webView2.getUrl();
synchronized (n0.o0) {
n0.oo(n0.this);
n0.this.om();
n0.n(n0.this);
}
if (n0.this.mo != null) {
n0.this.mo.o(webView2.getUrl(), str3, n0.this.nm);
}
}
@Override
public final void onReceivedSslError(WebView webView2, SslErrorHandler sslErrorHandler, SslError sslError) {
try {
String unused = n0.o0;
if (com.thinkup.expressad.m.o0m && sslErrorHandler != null) {
sslErrorHandler.cancel();
}
if (TextUtils.isEmpty(str2)) {
return;
}
TextUtils.isEmpty(str);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public final boolean onRenderProcessGone(WebView webView2, RenderProcessGoneDetail renderProcessGoneDetail) {
try {
synchronized (n0.o0) {
n0.oo(n0.this);
n0.this.om();
n0.n(n0.this);
}
if (n0.this.mo != null) {
n0.this.mo.o(webView2.getUrl(), "WebView render process crash.", n0.this.nm);
}
if (webView2 != null) {
webView2.destroy();
}
return true;
} catch (Throwable th) {
String unused = n0.o0;
th.getMessage();
return true;
}
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView2, String str3) {
synchronized (n0.o0) {
try {
String unused = n0.o0;
n0 n0Var = n0.this;
n0Var.n = true;
n0Var.mm();
if (n0.this.oo0) {
n0.this.m0();
n0.n(n0.this);
return true;
}
n0.this.mm = str3;
if (n0.this.mo != null && n0.this.mo.m(str3)) {
n0.oo(n0.this);
n0.this.m0();
n0.n(n0.this);
return true;
}
if (n0.this.no) {
HashMap hashMap = new HashMap();
if (n0.this.n0.getUrl() != null) {
hashMap.put("Referer", n0.this.n0.getUrl());
}
n0.this.n0.loadUrl(str3, hashMap);
} else {
n0.this.n0.loadUrl(str3);
}
return true;
} catch (Throwable th) {
throw th;
}
}
}
});
this.n0.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 {
String unused = n0.o0;
webView2.getUrl();
webView2.loadUrl("javascript:window.navigator.vibrate([]);");
if (!n0.this.oo0) {
n0 n0Var = n0.this;
if (!n0Var.n) {
n0.no(n0Var);
}
}
if (n0.this.mo != null) {
o unused2 = n0.this.mo;
webView2.getUrl();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}
}