整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 AppPrivacyPolicyActivity.java 源代码,内容仅作参考
package com.ss.android.downloadlib.addownload.compliance;
import android.annotation.TargetApi;
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.e.il;
public class AppPrivacyPolicyActivity extends Activity {
private ImageView g;
private long i;
private long ql;
private String r;
private WebView zc;
private void zc() {
this.g = (ImageView) findViewById(R.id.iv_privacy_back);
this.zc = (WebView) findViewById(R.id.privacy_webview);
this.g.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
e.g("lp_app_privacy_click_close", AppPrivacyPolicyActivity.this.ql);
AppPrivacyPolicyActivity.this.finish();
}
});
WebSettings settings = this.zc.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.zc.setWebViewClient(new WebViewClient() {
private boolean g(Uri uri) {
String scheme = uri.getScheme();
return ("http".equals(scheme) || "https".equals(scheme)) ? false : true;
}
@Override
public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
if (Build.VERSION.SDK_INT < 26) {
return super.onRenderProcessGone(webView, renderProcessGoneDetail);
}
if (!renderProcessGoneDetail.didCrash()) {
il.g("System killed the WebView rendering process to reclaim memory. Recreating...");
if (webView != null) {
((ViewGroup) webView.getParent()).removeView(webView);
webView.destroy();
}
return true;
}
il.g("The WebView rendering process crashed!");
if (webView != null) {
((ViewGroup) webView.getParent()).removeView(webView);
webView.destroy();
}
return true;
}
@Override
@TargetApi(21)
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
return g(webResourceRequest.getUrl());
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
return g(Uri.parse(str));
}
});
g(this.zc);
this.zc.setScrollBarStyle(0);
this.zc.loadUrl(this.r);
}
@Override
public void onBackPressed() {
e.g("lp_app_privacy_click_close", this.ql);
super.onBackPressed();
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.ttdownloader_activity_app_privacy_policy);
if (g()) {
zc();
} else {
com.ss.android.socialbase.appdownloader.i.g((Activity) this);
}
}
public static void g(Activity activity, long j) {
Intent intent = new Intent(activity, AppPrivacyPolicyActivity.class);
intent.putExtra("app_info_id", j);
activity.startActivity(intent);
}
private boolean g() {
this.i = getIntent().getLongExtra("app_info_id", 0L);
com.ss.android.downloadlib.addownload.zc.zc g = i.g().g(this.i);
if (g == null) {
return false;
}
this.ql = g.zc;
String str = g.gj;
this.r = str;
if (TextUtils.isEmpty(str)) {
this.r = com.ss.android.downloadlib.addownload.il.gj().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 g(WebView webView) {
try {
webView.removeJavascriptInterface("searchBoxJavaBridge_");
webView.removeJavascriptInterface("accessibility");
webView.removeJavascriptInterface("accessibilityTraversal");
} catch (Throwable unused) {
}
}
}