百度手机卫士 v8.8.0版本的 MD5 值为:a85894a6923c8a39f0c3a3a686ad7443
以下内容为反编译后的 WebBrowserActivity.java 源代码,内容仅作参考
package com.dianxinos.optimizer.web;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Process;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.webkit.WebView;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import cn.opda.a.phonoalbumshoushou.R;
import com.dianxinos.optimizer.ui.DxTitleBar;
import dxoptimizer.acx;
import dxoptimizer.aek;
import dxoptimizer.aww;
import dxoptimizer.awx;
import dxoptimizer.gim;
import dxoptimizer.hti;
import dxoptimizer.hvn;
import dxoptimizer.icb;
import dxoptimizer.icc;
import dxoptimizer.icg;
import dxoptimizer.ich;
import dxoptimizer.ici;
import dxoptimizer.ick;
import dxoptimizer.ico;
import dxoptimizer.icu;
import dxoptimizer.iwx;
import org.json.JSONArray;
import org.json.JSONException;
public class WebBrowserActivity extends aek implements View.OnClickListener, acx, awx {
private DxTitleBar j;
private ImageButton k;
private LinearLayout l;
private ProgressBar m;
private Handler n;
private boolean i = false;
private String o = null;
private String p = null;
private boolean q = false;
private boolean r = false;
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.jadx_deobf_0x00000af1);
this.n = new aww(this);
p();
q();
}
private void p() {
Intent intent = getIntent();
this.j = (DxTitleBar) findViewById(R.id.jadx_deobf_0x000010fd);
this.j.a((acx) this);
String b = ico.b(intent, "extra_title");
this.r = ico.a(intent, "extra_webtitle", false);
this.q = ico.a(intent, "extra_share", false);
this.o = ico.b(intent, "extra_share_info");
if (b != null) {
this.j.a(b);
}
this.l = (LinearLayout) findViewById(R.id.jadx_deobf_0x00001d27);
this.m = (ProgressBar) findViewById(R.id.jadx_deobf_0x00001d26);
this.p = ico.b(intent, "extra_url");
if (this.p == null) {
this.p = iwx.a();
}
}
private void q() {
a(6);
hti.a().b(new ick(this));
}
private void r() {
a(new icc(this), new ich(this), new icg(this), new ici(this), new icb(this));
View j = j();
if (j != null) {
ViewGroup.LayoutParams layoutParams = j.getLayoutParams();
if (layoutParams == null) {
layoutParams = new LinearLayout.LayoutParams(-1, -1, 1.0f);
}
layoutParams.width = -1;
layoutParams.height = -1;
j.setLayoutParams(layoutParams);
}
this.l.addView(j);
}
@Override
public void onStart() {
super.onStart();
if (!this.i) {
l();
this.i = true;
}
}
@TargetApi(21)
protected void l() {
if (Build.VERSION.SDK_INT >= 21) {
if (d(hvn.a((Context) this))) {
Window window = getWindow();
window.getDecorView().setSystemUiVisibility(1280);
window.addFlags(Integer.MIN_VALUE);
window.setStatusBarColor(0);
return;
}
e(getResources().getColor(R.color.jadx_deobf_0x00000f24));
}
}
protected boolean d(int i) {
ViewGroup viewGroup = (ViewGroup) findViewById(R.id.jadx_deobf_0x00001411);
if (viewGroup == null || i <= 0) {
return false;
}
((ViewGroup) viewGroup.getParent()).setPadding(0, i, 0, 0);
return true;
}
@TargetApi(21)
protected void e(int i) {
if (Build.VERSION.SDK_INT >= 21) {
Window window = getWindow();
window.addFlags(Integer.MIN_VALUE);
window.setStatusBarColor(i);
}
}
@Override
public void onResume() {
super.onResume();
if (this.q && this.o != null) {
this.j.a(true);
this.j.a(R.drawable.jadx_deobf_0x000003b7, this);
this.j.a((View.OnClickListener) this);
this.k = this.j.getSettingButton();
return;
}
this.j.a(false);
}
@Override
public void a(String str) {
if (this.r && this.j == null && str != null) {
this.r = false;
return;
}
this.j.a();
if (this.r && !TextUtils.isEmpty(str) && !e(str)) {
this.j.a(str);
}
}
@Override
public void a(WebView webView, int i) {
this.m.setProgress(i);
}
private boolean e(String str) {
return f(i()).equals(f(str));
}
private String f(String str) {
return str.replaceAll("(^[^:]*:(\\/\\/)?)|(\\?.*)", "");
}
@Override
public void b(String str) {
this.m.setVisibility(0);
}
@Override
public void c(String str) {
this.m.setVisibility(8);
}
@Override
public void b(int i) {
}
@Override
public void l_() {
finish();
}
@Override
public void finish() {
super.finish();
overridePendingTransition(R.anim.dx_enter_anim, R.anim.dx_exit_anim);
hvn.a((Activity) this);
Process.killProcess(Process.myPid());
}
@Override
public void onClick(View view) {
if (this.k != null && view == this.k) {
gim.a(this, getWindow().getDecorView(), this.o, null, null, "sks_wb", getString(R.string.jadx_deobf_0x00002c87));
icu.a("wb_cate", "wb_s", (Number) 1);
}
}
@Override
public void handleMessage(Message message) {
switch (message.what) {
case 0:
JSONArray jSONArray = (JSONArray) message.obj;
if (jSONArray == null) {
try {
jSONArray = new JSONArray("[{\"url\":\"https://sjws.dianxinos.com:8443/*\",\"perm\":\"all\"},{\"url\":\"https://sjws.dianxinos.com/*\",\"perm\":\"all\"},{\"url\":\"https://shoujiweishi.baidu.com/*\",\"perm\":\"all\"},{\"url\":\"file:///android_asset/www/*\",\"perm\":\"all\"} ]");
} catch (JSONException e) {
e.printStackTrace();
}
}
if (jSONArray != null) {
a(jSONArray);
}
r();
d(this.p);
return;
default:
return;
}
}
}