百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 isi.java 源代码,内容仅作参考
package dxoptimizer;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Handler;
import android.os.SystemClock;
import android.text.TextUtils;
import android.webkit.SslErrorHandler;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import java.util.HashMap;
import java.util.List;
import org.json.JSONObject;
public class isi extends WebViewClient {
final ise a;
private isi(ise iseVar) {
this.a = iseVar;
}
public isi(ise iseVar, isf isfVar) {
this(iseVar);
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
Context context;
FrameLayout frameLayout;
FrameLayout frameLayout2;
ivl ivlVar;
iwm iwmVar;
ivl ivlVar2;
isk iskVar;
isk iskVar2;
boolean e;
boolean z;
ivl ivlVar3;
String str2;
ivl ivlVar4;
String str3;
ius.a("openSDK_LOG.AuthDialog", "-->Redirect URL: " + str);
if (str.startsWith("auth://browser")) {
JSONObject c = iwg.c(str);
ise iseVar = this.a;
e = this.a.e();
iseVar.m = e;
z = this.a.m;
if (!z) {
if (c.optString("fail_cb", null) != null) {
this.a.a(c.optString("fail_cb"), "");
} else if (c.optInt("fall_to_wv") == 1) {
ise iseVar2 = this.a;
str2 = this.a.a;
ise.a(iseVar2, (Object) (str2.indexOf("?") > -1 ? "&" : "?"));
ise.a(this.a, (Object) "browser_error=1");
ivlVar4 = this.a.j;
str3 = this.a.a;
ivlVar4.loadUrl(str3);
} else {
String optString = c.optString("redir", null);
if (optString != null) {
ivlVar3 = this.a.j;
ivlVar3.loadUrl(optString);
}
}
}
return true;
}
if (str.startsWith("auth://tauth.qq.com/")) {
iskVar2 = this.a.b;
iskVar2.onComplete(iwg.c(str));
this.a.dismiss();
return true;
}
if (str.startsWith("auth://cancel")) {
iskVar = this.a.b;
iskVar.onCancel();
this.a.dismiss();
return true;
}
if (str.startsWith("auth://close")) {
this.a.dismiss();
return true;
}
if (str.startsWith("download://")) {
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(Uri.decode(str.substring("download://".length()))));
intent.addFlags(268435456);
context = this.a.k;
context.startActivity(intent);
} catch (Exception e2) {
ius.b("openSDK_LOG.AuthDialog", "-->start download activity exception, e: ", e2);
}
return true;
}
if (str.startsWith("auth://progress")) {
try {
List<String> pathSegments = Uri.parse(str).getPathSegments();
if (pathSegments.isEmpty()) {
return true;
}
int intValue = Integer.valueOf(pathSegments.get(0)).intValue();
if (intValue == 0) {
frameLayout2 = this.a.g;
frameLayout2.setVisibility(8);
ivlVar = this.a.j;
ivlVar.setVisibility(0);
} else if (intValue == 1) {
frameLayout = this.a.g;
frameLayout.setVisibility(0);
}
return true;
} catch (Exception e3) {
return true;
}
}
if (!str.startsWith("auth://onLoginSubmit")) {
iwmVar = this.a.l;
ivlVar2 = this.a.j;
if (iwmVar.a(ivlVar2, str)) {
return true;
}
ius.c("openSDK_LOG.AuthDialog", "-->Redirect URL: return false");
return false;
}
try {
List<String> pathSegments2 = Uri.parse(str).getPathSegments();
if (!pathSegments2.isEmpty()) {
this.a.p = pathSegments2.get(0);
}
} catch (Exception e4) {
}
return true;
}
@Override
public void onReceivedError(WebView webView, int i, String str, String str2) {
Context context;
String str3;
isk iskVar;
long j;
int i2;
ivl ivlVar;
String a;
long j2;
Handler handler;
isk iskVar2;
super.onReceivedError(webView, i, str, str2);
ius.c("openSDK_LOG.AuthDialog", "-->onReceivedError, errorCode: " + i + " | description: " + str);
context = this.a.k;
if (!iwg.c(context)) {
iskVar2 = this.a.b;
iskVar2.onError(new iwr(9001, "当前网络不可用,请稍后重试!", str2));
this.a.dismiss();
return;
}
str3 = this.a.o;
if (str3.startsWith("http://qzs.qq.com/open/mobile/login/qzsjump.html?")) {
iskVar = this.a.b;
iskVar.onError(new iwr(i, str, str2));
this.a.dismiss();
return;
}
long elapsedRealtime = SystemClock.elapsedRealtime();
j = this.a.q;
long j3 = elapsedRealtime - j;
i2 = this.a.n;
if (i2 < 1) {
j2 = this.a.r;
if (j3 < j2) {
ise.m(this.a);
handler = this.a.d;
handler.postDelayed(new isj(this), 500L);
return;
}
}
ivlVar = this.a.j;
a = this.a.a();
ivlVar.loadUrl(a);
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
FrameLayout frameLayout;
String str2;
String str3;
HashMap hashMap;
Handler handler;
Handler handler2;
HashMap hashMap2;
String str4;
ius.a("openSDK_LOG.AuthDialog", "-->onPageStarted, url: " + str);
super.onPageStarted(webView, str, bitmap);
frameLayout = this.a.g;
frameLayout.setVisibility(0);
this.a.q = SystemClock.elapsedRealtime();
str2 = this.a.o;
if (!TextUtils.isEmpty(str2)) {
handler2 = this.a.d;
hashMap2 = this.a.s;
str4 = this.a.o;
handler2.removeCallbacks((Runnable) hashMap2.remove(str4));
}
this.a.o = str;
ise iseVar = this.a;
str3 = this.a.o;
ism ismVar = new ism(iseVar, str3);
hashMap = this.a.s;
hashMap.put(str, ismVar);
handler = this.a.d;
handler.postDelayed(ismVar, 120000L);
}
@Override
public void onPageFinished(WebView webView, String str) {
FrameLayout frameLayout;
ivl ivlVar;
Handler handler;
HashMap hashMap;
ivl ivlVar2;
super.onPageFinished(webView, str);
ius.a("openSDK_LOG.AuthDialog", "-->onPageFinished, url: " + str);
frameLayout = this.a.g;
frameLayout.setVisibility(8);
ivlVar = this.a.j;
if (ivlVar != null) {
ivlVar2 = this.a.j;
ivlVar2.setVisibility(0);
}
if (!TextUtils.isEmpty(str)) {
handler = this.a.d;
hashMap = this.a.s;
handler.removeCallbacks((Runnable) hashMap.remove(str));
}
}
@Override
@TargetApi(8)
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
isk iskVar;
sslErrorHandler.cancel();
iskVar = this.a.b;
iskVar.onError(new iwr(sslError.getPrimaryError(), "请求不合法,请检查手机安全设置,如系统时间、代理等。", "ssl error"));
this.a.dismiss();
}
}