Power Battery v2.0.2版本的 MD5 值为:ca694e0112a4d0aa17ae668e765b51de
以下内容为反编译后的 PrivacyPolicyActivity.java 源代码,内容仅作参考
package com.lionmobi.battery.activity;
import android.content.Intent;
import android.net.MailTo;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.lionmobi.battery.R;
public class PrivacyPolicyActivity extends BaseActivity {
ProgressBar a;
private WebView b = null;
private TextView c;
class a extends WebChromeClient {
private a() {
}
a(PrivacyPolicyActivity privacyPolicyActivity, byte b) {
this();
}
@Override
public final void onProgressChanged(WebView webView, int i) {
PrivacyPolicyActivity.this.a.setProgress(i);
if (i == 100) {
PrivacyPolicyActivity.this.a.setProgress(0);
}
super.onProgressChanged(webView, i);
}
}
class b extends WebViewClient {
private b() {
}
b(PrivacyPolicyActivity privacyPolicyActivity, byte b) {
this();
}
@Override
public final void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
PrivacyPolicyActivity.this.a.setProgress(0);
if (str.startsWith("mailto:")) {
MailTo parse = MailTo.parse(str);
Intent intent = new Intent("android.intent.action.SEND");
intent.setType("text/plain");
intent.putExtra("android.intent.extra.EMAIL", new String[]{parse.getTo()});
intent.putExtra("android.intent.extra.SUBJECT", parse.getSubject());
intent.putExtra("android.intent.extra.CC", parse.getCc());
intent.putExtra("android.intent.extra.TEXT", parse.getBody());
PrivacyPolicyActivity.this.startActivity(intent);
webView.reload();
} else {
webView.loadUrl(str);
}
return true;
}
}
@Override
public void onBackPressed() {
if (this.b.canGoBack()) {
this.b.goBack();
} else {
super.onBackPressed();
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
requestWindowFeature(2);
setContentView(R.layout.activity_webview);
this.b = (WebView) findViewById(R.id.webview);
this.a = (ProgressBar) findViewById(R.id.pb);
this.a.setMax(100);
this.b.setWebViewClient(new b(this, (byte) 0));
this.b.setWebChromeClient(new a(this, (byte) 0));
try {
this.b.getSettings().setJavaScriptEnabled(true);
} catch (Exception unused) {
}
((TextView) findViewById(R.id.txt_title)).setText(getResources().getString(R.string.txt_announcement));
this.b.loadUrl("https://www.lionmobi.com/pb_privacypolicy.html");
findViewById(R.id.tv_title_back).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PrivacyPolicyActivity.this.finish();
}
});
this.c = (TextView) findViewById(R.id.img_back_icon);
vk.setSvg(this.c, this, R.xml.back_icon, 24.0f);
}
}