导航菜单

页面标题

页面副标题

夜猫麻将 v24.1.1 - SandWebActivity.java 源代码

正在查看: 夜猫麻将 v24.1.1 应用的 SandWebActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.pay.paytypelibrary.activity;

import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageButton;
import com.pay.paytypelibrary.R;
import com.pay.paytypelibrary.base.OrderInfo;

public class SandWebActivity extends Activity {

    public OrderInfo f8OooO00o;
    public WebView OooO0O0;

    public class OooO00o implements View.OnClickListener {
        public OooO00o() {
        }

        @Override
        public void onClick(View view) {
            SandWebActivity.this.finish();
        }
    }

    public class OooO0O0 extends WebViewClient {

        public class OooO implements Runnable {
            public OooO() {
            }

            @Override
            public void run() {
                if (SandWebActivity.this.isFinishing() || SandWebActivity.this.isRestricted()) {
                    return;
                }
                SandWebActivity.this.finish();
            }
        }

        public class OooO00o implements Runnable {
            public OooO00o() {
            }

            @Override
            public void run() {
                SandWebActivity.this.finish();
            }
        }

        public class RunnableC0019OooO0O0 implements Runnable {
            public RunnableC0019OooO0O0() {
            }

            @Override
            public void run() {
                SandWebActivity.this.finish();
            }
        }

        public class OooO0OO implements Runnable {
            public OooO0OO() {
            }

            @Override
            public void run() {
                SandWebActivity.this.finish();
            }
        }

        public class OooO0o implements Runnable {
            public OooO0o() {
            }

            @Override
            public void run() {
                SandWebActivity.this.finish();
            }
        }

        public OooO0O0() {
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            super.onPageStarted(webView, str, bitmap);
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            SandWebActivity sandWebActivity;
            OrderInfo orderInfo;
            String substring;
            Handler handler;
            Runnable runnableC0019OooO0O0;
            try {
                if (str.contains("pay/h5/quicktopup")) {
                    SandWebActivity.this.findViewById(R.id.title_ll).setVisibility(8);
                }
            } catch (Exception e) {
                e.getStackTrace();
            }
            if (!str.startsWith("wxpays://")) {
                if (str.startsWith("alipays://")) {
                    if (!str.contains("ret_code")) {
                        String[] split = str.split("&");
                        String str2 = split[0] + "&" + split[1];
                        Intent intent = new Intent(SandWebActivity.this, (Class<?>) AliPayActivity.class);
                        Bundle bundle = new Bundle();
                        bundle.putString("url", str2);
                        intent.putExtras(bundle);
                        SandWebActivity.this.startActivity(intent);
                        handler = new Handler();
                        runnableC0019OooO0O0 = new RunnableC0019OooO0O0();
                    }
                } else if (str.startsWith("unionpays://")) {
                    if (!str.contains("ret_code")) {
                        SandWebActivity.this.f8OooO00o.setTradeNo(str.split("\\?")[1].split("&")[0].split("=")[1]);
                        Intent intent2 = new Intent();
                        intent2.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                        SandWebActivity.this.setResult(-1, intent2);
                        new Handler().postDelayed(new OooO0OO(), 500L);
                    }
                } else {
                    if (!str.startsWith("sandpays://")) {
                        if (str.startsWith("linkpays://")) {
                            if (str.contains("ret_code")) {
                                return true;
                            }
                            String str3 = str.split("\\?")[1].split("&")[0].split("=")[1];
                            ((ClipboardManager) SandWebActivity.this.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText(null, str3));
                            SandWebActivity.this.f8OooO00o.setTradeUrl(str3);
                            Intent intent3 = new Intent();
                            intent3.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                            SandWebActivity.this.setResult(-1, intent3);
                        } else if (!str.startsWith("sandcashiers://")) {
                            if (!str.startsWith("appletpays://")) {
                                if (!str.startsWith("fastpayment://") && !str.startsWith("ecdpsign://")) {
                                    if (str.startsWith("dceppays://")) {
                                        String str4 = str.split("\\?")[1];
                                        String str5 = str4.split("&")[0].split("=")[1];
                                        String str6 = str4.split("&")[1].split("=")[1];
                                        if ("ok".equalsIgnoreCase(str5)) {
                                            SandWebActivity.this.f8OooO00o.setDcpRetCode("0");
                                            Intent intent4 = new Intent();
                                            intent4.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                                            SandWebActivity.this.setResult(-1, intent4);
                                            new Handler().postDelayed(new OooO(), 2500L);
                                        }
                                    } else {
                                        if (str.startsWith("sandh5payres://")) {
                                            int indexOf = str.indexOf("://") + 3;
                                            if (indexOf == str.length()) {
                                                SandWebActivity.this.f8OooO00o.setH5PayResAction("no action");
                                            } else {
                                                int indexOf2 = str.indexOf("/", indexOf);
                                                if (indexOf2 != -1) {
                                                    orderInfo = SandWebActivity.this.f8OooO00o;
                                                    substring = str.substring(indexOf, indexOf2);
                                                } else {
                                                    orderInfo = SandWebActivity.this.f8OooO00o;
                                                    substring = str.substring(indexOf);
                                                }
                                                orderInfo.setH5PayResAction(substring);
                                            }
                                            Intent intent5 = new Intent();
                                            intent5.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                                            SandWebActivity.this.setResult(-1, intent5);
                                        } else if (!str.contains("about:blank")) {
                                            return false;
                                        }
                                        sandWebActivity = SandWebActivity.this;
                                    }
                                }
                                return true;
                            }
                            if (str.contains("ret_code")) {
                                return true;
                            }
                            SandWebActivity.this.f8OooO00o.setH5UrlTokenId(str.split("\\?")[1].split("&")[0].split("=")[1]);
                            Intent intent6 = new Intent();
                            intent6.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                            SandWebActivity.this.setResult(-1, intent6);
                            sandWebActivity = SandWebActivity.this;
                            sandWebActivity.finish();
                            return true;
                        }
                        sandWebActivity = SandWebActivity.this;
                        sandWebActivity.finish();
                        return true;
                    }
                    if (str.contains("ret_code")) {
                        return true;
                    }
                    SandWebActivity.this.f8OooO00o.setSandTn(str.split("\\?")[1].split("&")[0].split("=")[1].split(":")[1]);
                    Intent intent7 = new Intent();
                    intent7.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
                    SandWebActivity.this.setResult(-1, intent7);
                    new Handler().postDelayed(new OooO0o(), 500L);
                }
                return true;
            }
            if (str.contains("ret_code")) {
                return true;
            }
            SandWebActivity.this.f8OooO00o.setTokenId(str.split("\\?")[1].split("&")[0].split("=")[1]);
            Intent intent8 = new Intent();
            intent8.putExtra("orderInfo", SandWebActivity.this.f8OooO00o);
            SandWebActivity.this.setResult(-1, intent8);
            handler = new Handler();
            runnableC0019OooO0O0 = new OooO00o();
            handler.postDelayed(runnableC0019OooO0O0, 500L);
            return true;
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.sand_activity_web);
        try {
            Bundle extras = getIntent().getExtras();
            if (extras == null) {
                finish();
                return;
            }
            try {
                String string = extras.getString("url");
                this.f8OooO00o = (OrderInfo) extras.getSerializable("orderInfo");
                ((ImageButton) findViewById(R.id.btn_back)).setOnClickListener(new OooO00o());
                WebView webView = (WebView) findViewById(R.id.webview);
                this.OooO0O0 = webView;
                WebSettings settings = webView.getSettings();
                settings.setJavaScriptEnabled(true);
                settings.setAllowFileAccess(true);
                settings.setBuiltInZoomControls(true);
                settings.setCacheMode(2);
                settings.setDomStorageEnabled(true);
                settings.setGeolocationEnabled(true);
                this.OooO0O0.setWebViewClient(new OooO0O0());
                this.OooO0O0.loadUrl(string);
            } catch (Exception e) {
                finish();
            }
        } catch (Exception e2) {
            finish();
        }
    }

    @Override
    public void onDestroy() {
        WebView webView = this.OooO0O0;
        if (webView != null) {
            webView.clearHistory();
            this.OooO0O0.setWebViewClient(null);
            this.OooO0O0.removeAllViews();
            if (this.OooO0O0.getParent() instanceof ViewGroup) {
                ((ViewGroup) this.OooO0O0.getParent()).removeView(this.OooO0O0);
            }
            this.OooO0O0.destroy();
            this.OooO0O0 = null;
        }
        super.onDestroy();
    }

    @Override
    public void onResume() {
        super.onResume();
        WebView webView = this.OooO0O0;
        if (webView != null) {
            webView.resumeTimers();
            this.OooO0O0.onResume();
        }
    }
}