360手机助手 v3.3.0版本的 MD5 值为:127c345ad16bbebee6e347381328afd0
以下内容为反编译后的 WebViewActivity.java 源代码,内容仅作参考
package com.qihoo360.accounts.ui.a;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.qihoo.freewifi.push.R;
public class WebViewActivity extends Activity implements View.OnClickListener {
private WebView f5257a;
private int f5258b;
private TextView c;
private ImageView d;
private Button e;
private String f;
private void a() {
this.f5257a = (WebView) findViewById(R.id.web_view);
this.c = (TextView) findViewById(R.id.qihoo_accounts_webview_top_title);
this.d = (ImageView) findViewById(R.id.webview_rotate_image);
this.e = (Button) findViewById(R.id.webview_top_close);
this.e.setOnClickListener(this);
findViewById(R.id.webview_top_back).setOnClickListener(this);
}
private final void a(Intent intent) {
if (intent == null) {
return;
}
this.f5258b = intent.getIntExtra("webview", 17);
String stringExtra = intent.getStringExtra("account");
this.f = getResources().getString(R.string.qihoo_accounts_webview_findpwd_skin);
if ((this.f5258b & 17) != 0) {
if (TextUtils.isEmpty(stringExtra)) {
a("http://i.360.cn/findpwdwap?client=app&skin=" + this.f);
return;
} else {
a("http://i.360.cn/findpwdwap?client=app&skin=" + this.f + "&account=" + stringExtra);
return;
}
}
if ((this.f5258b & 4352) != 0) {
this.c.setText(R.string.qihoo_accounts_webview_lisence);
a("http://i.360.cn/reg/protocol?titlebar_space=1");
}
}
private void a(String str) {
this.f5257a.requestFocusFromTouch();
this.f5257a.getSettings().setJavaScriptEnabled(true);
b();
this.f5257a.getSettings().setLoadWithOverviewMode(true);
this.f5257a.getSettings().setSupportZoom(true);
this.f5257a.getSettings().setBuiltInZoomControls(true);
this.f5257a.getSettings().setCacheMode(2);
this.f5257a.getSettings().setDefaultTextEncodingName("utf-8");
this.f5257a.setWebViewClient(new c(this));
this.f5257a.loadUrl(str);
}
private boolean b() {
try {
if (Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT < 17) {
this.f5257a.getClass().getMethod("removeJavascriptInterface", String.class).invoke(this.f5257a, "searchBoxJavaBridge_");
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
@Override
public void onClick(View view) {
int id = view.getId();
if (id != R.id.webview_top_back) {
if (id == R.id.webview_top_close) {
finish();
}
} else if (this.f5257a.canGoBack()) {
this.f5257a.goBack();
} else {
finish();
}
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.qihoo_accounts_webview_activity);
a();
a(getIntent());
}
@Override
protected void onDestroy() {
super.onDestroy();
finish();
}
@Override
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i != 4 || !this.f5257a.canGoBack()) {
return super.onKeyDown(i, keyEvent);
}
this.f5257a.goBack();
return true;
}
}