大富豪 v1.0.0版本的 MD5 值为:ed626b9299b162d5569a1a34631c2314
以下内容为反编译后的 KQgRr5e_0.java 源代码,内容仅作参考
package IMuAHx_6.QxJ9d_1.IFxWkV_5.QxJ9d_1;
import X6FRs_4.KQgRr5e_0.Nm6q_10.QxJ9d_1;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.ConsoleMessage;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.DownloadListener;
import android.webkit.GeolocationPermissions;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.SslErrorHandler;
import android.webkit.URLUtil;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.recyclerview.widget.RecyclerView;
import com.myapp.app.MainActivity;
import com.myapp.utils.Utils;
import com.myapp.wrap.config.AppConfig;
import com.myapp.wrap.config.InjectJSModule;
import com.myapp.wrap.config.ZoomModule;
import com.myapp.wrap.webview.WebViewInjectInterface;
import com.wang.avi.AVLoadingIndicatorView;
import java.net.URLDecoder;
import java.util.HashMap;
import me.jingbin.progress.WebProgress;
public class KQgRr5e_0 extends WebView {
public static final ViewGroup.LayoutParams KQgRr5e_0 = new ViewGroup.LayoutParams(-1, -1);
public View f282KQgRr5e_0;
public ValueCallback<Uri[]> f283KQgRr5e_0;
public WebChromeClient.CustomViewCallback f284KQgRr5e_0;
public MainActivity f285KQgRr5e_0;
public AVLoadingIndicatorView f286KQgRr5e_0;
public String f287KQgRr5e_0;
public WebProgress f288KQgRr5e_0;
public boolean QxJ9d_1;
public class C0017KQgRr5e_0 extends WebViewClient {
public C0017KQgRr5e_0() {
}
public final void KQgRr5e_0() {
InjectJSModule injectJSModule = AppConfig.Instance.injectJs;
if (injectJSModule == null || !injectJSModule.open.equals("1")) {
return;
}
if (injectJSModule.quoteJs.equals("1")) {
KQgRr5e_0.this.QxJ9d_1(injectJSModule.bufanJSURL);
}
if (injectJSModule.type.equals("2")) {
try {
KQgRr5e_0.this.KQgRr5e_0(URLDecoder.decode(injectJSModule.content, "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
} else if (injectJSModule.type.equals("1")) {
KQgRr5e_0.this.QxJ9d_1(injectJSModule.url);
}
}
@Override
public void onPageFinished(WebView webView, String str) {
Log.d("SystemWebView", "onPageFinished:" + str);
WebProgress webProgress = KQgRr5e_0.this.f288KQgRr5e_0;
if (webProgress != null) {
webProgress.QxJ9d_1();
}
AVLoadingIndicatorView aVLoadingIndicatorView = KQgRr5e_0.this.f286KQgRr5e_0;
if (aVLoadingIndicatorView != null) {
aVLoadingIndicatorView.smoothToHide();
}
KQgRr5e_0.this.f285KQgRr5e_0.checkNetStateModule();
super.onPageFinished(webView, str);
KQgRr5e_0();
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
Log.d("SystemWebView", "onPageStarted:" + str);
AVLoadingIndicatorView aVLoadingIndicatorView = KQgRr5e_0.this.f286KQgRr5e_0;
if (aVLoadingIndicatorView != null) {
aVLoadingIndicatorView.smoothToShow();
}
KQgRr5e_0.this.f285KQgRr5e_0.forceShow = false;
KQgRr5e_0.this.f285KQgRr5e_0.setNoNetShow(false);
super.onPageStarted(webView, str, bitmap);
}
@Override
@TargetApi(23)
public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
super.onReceivedError(webView, webResourceRequest, webResourceError);
Log.d("SystemWebView", "onReceivedError code:" + webResourceError.getErrorCode());
if (webResourceRequest.isForMainFrame()) {
KQgRr5e_0.this.f285KQgRr5e_0.forceShowNonet();
}
}
@Override
@TargetApi(21)
public void onReceivedHttpError(WebView webView, WebResourceRequest webResourceRequest, WebResourceResponse webResourceResponse) {
super.onReceivedHttpError(webView, webResourceRequest, webResourceResponse);
int statusCode = webResourceResponse.getStatusCode();
Log.d("SystemWebView", "onReceivedHttpError code:" + statusCode);
if (webResourceRequest.isForMainFrame()) {
KQgRr5e_0.this.f285KQgRr5e_0.forceShowNonet();
}
}
@Override
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
sslErrorHandler.proceed();
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
String str2;
Log.d("SystemWebView", "shouldOverrideUrlLoading url:" + str);
if (str.contains("https://wx.tenpay.com") && (str2 = KQgRr5e_0.this.f287KQgRr5e_0) != null && !str2.isEmpty()) {
HashMap hashMap = new HashMap();
hashMap.put("Referer", str2);
webView.loadUrl(str, hashMap);
return true;
} else if (str.startsWith("http://") || str.startsWith("https://")) {
KQgRr5e_0.this.f287KQgRr5e_0 = str;
return false;
} else {
if (str.startsWith("weixin://") || str.startsWith("alipays://") || str.startsWith("tel:") || str.startsWith("mailto:")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
} else if (str.startsWith("baidumap://") || str.startsWith("iosamap://") || str.startsWith("weibo:") || str.startsWith("TencentWeibo:")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
} else if (str.startsWith("snssdk141://") || str.startsWith("openApp.jdMobile://") || str.startsWith("youku:")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
} else if (str.startsWith("tenvideo://") || str.startsWith("zhihu://") || str.startsWith("imeituan:") || str.startsWith("baiduyun:")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
} else if (str.startsWith("taobao://") || str.startsWith("tmall://") || str.startsWith("mqqapi:") || str.startsWith("mqq:")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
} else if (str.startsWith("mqqopensdkapi://") || str.startsWith("qimopensdkapi://") || str.startsWith("qimapi://")) {
Utils.doOpenWeb(KQgRr5e_0.this.f285KQgRr5e_0, str);
}
return true;
}
}
}
public class Mqv2r_3 implements View.OnLongClickListener {
public Mqv2r_3() {
}
@Override
public boolean onLongClick(View view) {
WebView.HitTestResult hitTestResult = KQgRr5e_0.this.getHitTestResult();
if (hitTestResult == null) {
return !KQgRr5e_0.this.QxJ9d_1;
}
switch (hitTestResult.getType()) {
case 2:
case 3:
case 4:
case 9:
return false;
case 5:
case 8:
KQgRr5e_0.this.f285KQgRr5e_0.onLongClickImage(hitTestResult.getExtra());
return true;
case 6:
default:
return !KQgRr5e_0.this.QxJ9d_1;
case 7:
KQgRr5e_0.this.f285KQgRr5e_0.onLongClickURL(hitTestResult.getExtra());
return true;
}
}
}
public class PGPF6hQ_2 implements DownloadListener {
public class RunnableC0018KQgRr5e_0 implements Runnable {
public final String f289KQgRr5e_0;
public final String PGPF6hQ_2;
public final String QxJ9d_1;
public RunnableC0018KQgRr5e_0(String str, String str2, String str3) {
this.f289KQgRr5e_0 = str;
this.QxJ9d_1 = str2;
this.PGPF6hQ_2 = str3;
}
@Override
public void run() {
KQgRr5e_0.this.f285KQgRr5e_0.downloadFile(this.f289KQgRr5e_0, this.QxJ9d_1, this.PGPF6hQ_2);
}
}
public PGPF6hQ_2() {
}
@Override
public void onDownloadStart(String str, String str2, String str3, String str4, long j) {
Log.d("SystemWebView", "start download:" + str);
KQgRr5e_0.this.f285KQgRr5e_0.runOnUiThread(new RunnableC0018KQgRr5e_0(str, URLUtil.guessFileName(str, str3, str4), str4));
}
}
public class QxJ9d_1 extends WebChromeClient {
public class DialogInterface$OnClickListenerC0019KQgRr5e_0 implements DialogInterface.OnClickListener {
public final JsResult f290KQgRr5e_0;
public DialogInterface$OnClickListenerC0019KQgRr5e_0(JsResult jsResult) {
this.f290KQgRr5e_0 = jsResult;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.f290KQgRr5e_0.cancel();
KQgRr5e_0.this.f285KQgRr5e_0.setupDecorBar();
}
}
public class PGPF6hQ_2 implements DialogInterface.OnClickListener {
public final JsResult f291KQgRr5e_0;
public PGPF6hQ_2(JsResult jsResult) {
this.f291KQgRr5e_0 = jsResult;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.f291KQgRr5e_0.confirm();
KQgRr5e_0.this.f285KQgRr5e_0.setupDecorBar();
}
}
public class DialogInterface$OnClickListenerC0020QxJ9d_1 implements DialogInterface.OnClickListener {
public final JsResult f292KQgRr5e_0;
public DialogInterface$OnClickListenerC0020QxJ9d_1(JsResult jsResult) {
this.f292KQgRr5e_0 = jsResult;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
this.f292KQgRr5e_0.confirm();
KQgRr5e_0.this.f285KQgRr5e_0.setupDecorBar();
}
}
public QxJ9d_1() {
}
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
return super.onConsoleMessage(consoleMessage);
}
@Override
public void onGeolocationPermissionsShowPrompt(String str, GeolocationPermissions.Callback callback) {
if (Build.VERSION.SDK_INT >= 23 && X6FRs_4.IMuAHx_6.X6FRs_4.KQgRr5e_0.KQgRr5e_0((Context) KQgRr5e_0.this.f285KQgRr5e_0, "android.permission.ACCESS_COARSE_LOCATION") != 0) {
X6FRs_4.IMuAHx_6.Mqv2r_3.KQgRr5e_0.KQgRr5e_0(KQgRr5e_0.this.f285KQgRr5e_0, new String[]{"android.permission.ACCESS_FINE_LOCATION"}, 1);
}
callback.invoke(str, true, false);
}
@Override
public void onHideCustomView() {
KQgRr5e_0 kQgRr5e_0 = KQgRr5e_0.this;
if (kQgRr5e_0.f282KQgRr5e_0 == null) {
return;
}
kQgRr5e_0.f285KQgRr5e_0.setRequestedOrientation(2);
KQgRr5e_0.this.f282KQgRr5e_0.setVisibility(8);
KQgRr5e_0.this.f285KQgRr5e_0.getRootViewGroup().removeView(KQgRr5e_0.this.f282KQgRr5e_0);
KQgRr5e_0.this.f284KQgRr5e_0.onCustomViewHidden();
KQgRr5e_0 kQgRr5e_02 = KQgRr5e_0.this;
kQgRr5e_02.f282KQgRr5e_0 = null;
kQgRr5e_02.f284KQgRr5e_0 = null;
kQgRr5e_02.setVisibility(0);
KQgRr5e_0.this.f285KQgRr5e_0.showAppbar();
if (Build.VERSION.SDK_INT >= 19) {
KQgRr5e_0.this.f285KQgRr5e_0.getWindow().clearFlags(RecyclerView.WGk6X_27.FLAG_ADAPTER_POSITION_UNKNOWN);
}
}
@Override
public boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) {
QxJ9d_1.KQgRr5e_0 kQgRr5e_0 = new QxJ9d_1.KQgRr5e_0(KQgRr5e_0.this.f285KQgRr5e_0);
kQgRr5e_0.QxJ9d_1("提示");
kQgRr5e_0.KQgRr5e_0(str2);
kQgRr5e_0.QxJ9d_1("确定", new PGPF6hQ_2(jsResult));
kQgRr5e_0.KQgRr5e_0().show();
return true;
}
@Override
public boolean onJsConfirm(WebView webView, String str, String str2, JsResult jsResult) {
QxJ9d_1.KQgRr5e_0 kQgRr5e_0 = new QxJ9d_1.KQgRr5e_0(KQgRr5e_0.this.f285KQgRr5e_0);
kQgRr5e_0.QxJ9d_1("提示");
kQgRr5e_0.KQgRr5e_0(str2);
kQgRr5e_0.QxJ9d_1("确认", new DialogInterface$OnClickListenerC0020QxJ9d_1(jsResult));
kQgRr5e_0.KQgRr5e_0("取消", new DialogInterface$OnClickListenerC0019KQgRr5e_0(jsResult));
kQgRr5e_0.KQgRr5e_0().show();
return true;
}
@Override
public boolean onJsPrompt(WebView webView, String str, String str2, String str3, JsPromptResult jsPromptResult) {
return false;
}
@Override
public void onProgressChanged(WebView webView, int i) {
AVLoadingIndicatorView aVLoadingIndicatorView;
super.onProgressChanged(webView, i);
WebProgress webProgress = KQgRr5e_0.this.f288KQgRr5e_0;
if (webProgress != null) {
webProgress.setWebProgress(i);
}
if (i < 100 || (aVLoadingIndicatorView = KQgRr5e_0.this.f286KQgRr5e_0) == null) {
return;
}
aVLoadingIndicatorView.smoothToHide();
}
@Override
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback customViewCallback) {
KQgRr5e_0 kQgRr5e_0 = KQgRr5e_0.this;
if (kQgRr5e_0.f282KQgRr5e_0 != null) {
customViewCallback.onCustomViewHidden();
return;
}
kQgRr5e_0.f282KQgRr5e_0 = view;
kQgRr5e_0.f284KQgRr5e_0 = customViewCallback;
if (Build.VERSION.SDK_INT >= 19) {
view.setSystemUiVisibility(7942);
KQgRr5e_0.this.f285KQgRr5e_0.getWindow().setFlags(RecyclerView.WGk6X_27.FLAG_ADAPTER_POSITION_UNKNOWN, RecyclerView.WGk6X_27.FLAG_ADAPTER_POSITION_UNKNOWN);
}
KQgRr5e_0.this.f282KQgRr5e_0.setBackgroundColor(-16777216);
KQgRr5e_0.this.f285KQgRr5e_0.getRootViewGroup().addView(KQgRr5e_0.this.f282KQgRr5e_0, KQgRr5e_0.KQgRr5e_0);
KQgRr5e_0.this.setVisibility(8);
KQgRr5e_0.this.f285KQgRr5e_0.hideAppbar();
KQgRr5e_0.this.f285KQgRr5e_0.setRequestedOrientation(0);
}
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> valueCallback, WebChromeClient.FileChooserParams fileChooserParams) {
KQgRr5e_0.this.f283KQgRr5e_0 = valueCallback;
if (Build.VERSION.SDK_INT >= 21) {
String[] acceptTypes = fileChooserParams.getAcceptTypes();
if (acceptTypes.length == 1) {
if (fileChooserParams.isCaptureEnabled()) {
if (acceptTypes[0].startsWith("image/")) {
MainActivity.instance.openCamera(108);
} else if (acceptTypes[0].startsWith("video/")) {
MainActivity.instance.openVideo(107);
} else {
MainActivity.instance.openCamera(108);
}
} else {
MainActivity.instance.openFileChooserForTypes(acceptTypes, 107);
}
} else {
MainActivity.instance.openFileChooserForTypes(acceptTypes, 107);
}
} else {
MainActivity.instance.openFileChooserActivity("*", 107);
}
return true;
}
}
public KQgRr5e_0(ViewGroup viewGroup, MainActivity mainActivity) {
super(mainActivity);
this.f287KQgRr5e_0 = null;
this.QxJ9d_1 = true;
this.f288KQgRr5e_0 = null;
this.f286KQgRr5e_0 = null;
this.f285KQgRr5e_0 = mainActivity;
setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
viewGroup.addView(this);
if (Build.VERSION.SDK_INT >= 26) {
getSettings().setSafeBrowsingEnabled(false);
}
setWebViewClient(new C0017KQgRr5e_0());
setWebChromeClient(new QxJ9d_1());
WebSettings settings = getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
if (Build.VERSION.SDK_INT >= 21) {
settings.setMixedContentMode(0);
}
ZoomModule zoomModule = AppConfig.Instance.zoom;
if (zoomModule != null && zoomModule.open.equals("1")) {
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
settings.setUseWideViewPort(true);
} else {
settings.setBuiltInZoomControls(false);
settings.setUseWideViewPort(true);
}
settings.setDomStorageEnabled(true);
settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
settings.setLoadWithOverviewMode(true);
settings.setSupportMultipleWindows(false);
settings.setAppCacheEnabled(true);
settings.setDomStorageEnabled(true);
settings.setGeolocationEnabled(true);
settings.setPluginState(WebSettings.PluginState.ON);
settings.setAllowFileAccess(true);
settings.setAllowContentAccess(false);
if (Build.VERSION.SDK_INT >= 16) {
settings.setAllowFileAccessFromFileURLs(false);
settings.setAllowUniversalAccessFromFileURLs(false);
}
if (Build.VERSION.SDK_INT >= 17) {
settings.setMediaPlaybackRequiresUserGesture(false);
}
setDownloadListener(new PGPF6hQ_2());
WebViewInjectInterface.KQgRr5e_0.KQgRr5e_0(this);
addJavascriptInterface(WebViewInjectInterface.KQgRr5e_0, "BUFANInterface");
QxJ9d_1();
}
public final void QxJ9d_1() {
setLongClickable(true);
setOnLongClickListener(new Mqv2r_3());
}
public String getUserAgent() {
return getSettings().getUserAgentString();
}
@Override
public boolean onTouchEvent(MotionEvent motionEvent) {
boolean onTouchEvent = super.onTouchEvent(motionEvent);
this.f285KQgRr5e_0.onGestureTouchEvent(motionEvent);
return onTouchEvent;
}
public void setCanCopyText(boolean z) {
this.QxJ9d_1 = z;
}
public void setLoadingAni(AVLoadingIndicatorView aVLoadingIndicatorView) {
this.f286KQgRr5e_0 = aVLoadingIndicatorView;
}
public void setProgressView(WebProgress webProgress) {
this.f288KQgRr5e_0 = webProgress;
}
public void setUserAgent(String str) {
getSettings().setUserAgentString(str);
}
public void QxJ9d_1(String str) {
KQgRr5e_0(String.format("const s = document.createElement('script');s.setAttribute('src', '%s');document.getElementsByTagName('head')[0].appendChild(s);", str));
}
public void KQgRr5e_0(Uri uri) {
ValueCallback<Uri[]> valueCallback = this.f283KQgRr5e_0;
if (valueCallback == null) {
return;
}
if (uri == null) {
valueCallback.onReceiveValue(null);
} else {
valueCallback.onReceiveValue(new Uri[]{uri});
}
this.f283KQgRr5e_0 = null;
}
public void KQgRr5e_0(String str) {
if (Build.VERSION.SDK_INT >= 19) {
evaluateJavascript(str, null);
return;
}
loadUrl("javascript:" + str);
}
public void KQgRr5e_0() {
if (Build.VERSION.SDK_INT >= 21) {
CookieManager.getInstance().removeAllCookies(null);
CookieManager.getInstance().flush();
return;
}
CookieManager.getInstance().removeAllCookie();
CookieSyncManager.getInstance().sync();
}
}