我要上王者 v1.1版本的 MD5 值为:b7d3566522def961cabeb92cb17f5db9
以下内容为反编译后的 AppPrivacyPolicyActivity.java 源代码,内容仅作参考
package com.ss.android.downloadlib.addownload.compliance;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import com.bytedance.sdk.openadsdk.R;
import com.ss.android.downloadlib.addownload.sl;
public class AppPrivacyPolicyActivity extends Activity {
private ImageView f285if;
private long j;
private String tc;
private WebView x;
private long z;
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.ttdownloader_activity_app_privacy_policy);
if (m398if()) {
x();
} else {
com.ss.android.socialbase.appdownloader.z.m1101if((Activity) this);
}
}
public static void m396if(Activity activity, long j) {
Intent intent = new Intent(activity, AppPrivacyPolicyActivity.class);
intent.putExtra("app_info_id", j);
activity.startActivity(intent);
}
private boolean m398if() {
this.z = getIntent().getLongExtra("app_info_id", 0L);
com.ss.android.downloadlib.addownload.x.x m458if = z.m457if().m458if(this.z);
if (m458if == null) {
return false;
}
this.j = m458if.x;
String str = m458if.f6253b;
this.tc = str;
if (TextUtils.isEmpty(str)) {
this.tc = sl.b().optString("ad_privacy_backup_url", "https://sf6-ttcdn-tos.pstatp.com/obj/ad-tetris-site/personal-privacy-page.html");
return true;
}
return true;
}
private void x() {
this.f285if = (ImageView) findViewById(R.id.iv_privacy_back);
this.x = (WebView) findViewById(R.id.privacy_webview);
this.f285if.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
w.m446if("lp_app_privacy_click_close", AppPrivacyPolicyActivity.this.j);
AppPrivacyPolicyActivity.this.finish();
}
});
WebSettings settings = this.x.getSettings();
settings.setDefaultFontSize(16);
settings.setCacheMode(-1);
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
if (Build.VERSION.SDK_INT >= 21) {
settings.setMixedContentMode(0);
}
settings.setLoadWithOverviewMode(true);
settings.setUseWideViewPort(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setSavePassword(false);
settings.setAllowFileAccess(false);
this.x.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
return m399if(webResourceRequest.getUrl());
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
return m399if(Uri.parse(str));
}
@Override
public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
if (Build.VERSION.SDK_INT < 26) {
return super.onRenderProcessGone(webView, renderProcessGoneDetail);
}
if (!renderProcessGoneDetail.didCrash()) {
com.ss.android.downloadlib.w.sl.m824if("System killed the WebView rendering process to reclaim memory. Recreating...");
if (webView != null) {
((ViewGroup) webView.getParent()).removeView(webView);
webView.destroy();
}
return true;
}
com.ss.android.downloadlib.w.sl.m824if("The WebView rendering process crashed!");
if (webView != null) {
((ViewGroup) webView.getParent()).removeView(webView);
webView.destroy();
}
return true;
}
private boolean m399if(Uri uri) {
String scheme = uri.getScheme();
return ("http".equals(scheme) || "https".equals(scheme)) ? false : true;
}
});
m397if(this.x);
this.x.setScrollBarStyle(0);
this.x.loadUrl(this.tc);
}
private void m397if(WebView webView) {
try {
webView.removeJavascriptInterface("searchBoxJavaBridge_");
webView.removeJavascriptInterface("accessibility");
webView.removeJavascriptInterface("accessibilityTraversal");
} catch (Throwable unused) {
}
}
@Override
public void onBackPressed() {
w.m446if("lp_app_privacy_click_close", this.j);
super.onBackPressed();
}
}