正在查看: 小柿子 v1.3.8 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 小柿子 v1.3.8 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package a2;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import java.util.List;
public class a {
public Activity a;
public WebView b;
public WebViewClient c = new C0000a();
public WebChromeClient d = new b();
public class b extends WebChromeClient {
public b() {
}
@Override
public void onProgressChanged(WebView webView, int i) {
super.onProgressChanged(webView, i);
a.this.a.isFinishing();
}
@Override
public void onReceivedTitle(WebView webView, String str) {
if (str == null || str.equals("")) {
return;
}
a.this.a.setTitle(str);
}
}
public void a(Activity activity, WebView webView) {
this.a = activity;
this.b = webView;
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setAppCacheMaxSize(8388608L);
settings.setAllowFileAccess(true);
settings.setAppCacheEnabled(true);
settings.setAppCachePath(activity.getApplication().getCacheDir().getAbsolutePath());
settings.setDatabaseEnabled(true);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setTextZoom(100);
settings.setCacheMode(2);
settings.setAllowFileAccess(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setLoadsImagesAutomatically(true);
settings.setDefaultTextEncodingName("utf-8");
settings.setBlockNetworkImage(false);
settings.setUseWideViewPort(true);
if (Build.VERSION.SDK_INT >= 21) {
settings.setMixedContentMode(0);
}
webView.setWebChromeClient(this.d);
webView.setWebViewClient(this.c);
}
public class C0000a extends WebViewClient {
public class DialogInterfaceOnClickListenerC0001a implements DialogInterface.OnClickListener {
public final Activity a;
public DialogInterfaceOnClickListenerC0001a(Activity activity) {
this.a = activity;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.a.startActivity(new Intent("android.intent.action.VIEW", Uri.parse("https://d.alipay.com")));
}
}
public C0000a() {
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
a.this.a.isFinishing();
}
@Override
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
sslErrorHandler.proceed();
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (a.this.a.isFinishing()) {
return true;
}
Activity activity = a.this.a;
if (str.startsWith("alipays:") || str.startsWith("alipay")) {
try {
activity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
} catch (Exception unused) {
new AlertDialog.Builder(activity).setMessage("未检测到支付宝客户端,请安装后重试。").setPositiveButton("立即安装", new DialogInterfaceOnClickListenerC0001a(activity)).setNegativeButton("取消", (DialogInterface.OnClickListener) null).show();
}
return true;
}
if (str.startsWith("weixin:")) {
try {
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.setData(Uri.parse(str));
activity.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
if (str.startsWith("https:") || str.startsWith("http:")) {
return false;
}
try {
Intent intent2 = new Intent();
intent2.setAction("android.intent.action.VIEW");
intent2.setData(Uri.parse(str));
List<ResolveInfo> queryIntentActivities = activity.getPackageManager().queryIntentActivities(intent2, 65536);
if (queryIntentActivities != null && queryIntentActivities.size() > 0) {
activity.startActivity(intent2);
}
} catch (Exception e5) {
e5.printStackTrace();
}
return true;
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
return super.shouldOverrideUrlLoading(webView, webResourceRequest);
}
}
}