导航菜单

页面标题

页面副标题

PrestaMax v1.0.9 - WebHAuthActivity.java 源代码

正在查看: PrestaMax v1.0.9 应用的 WebHAuthActivity.java JAVA 源代码文件

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


package com.prestamx.max.activity;

import android.content.ClipData;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.activity.OnBackPressedCallback;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import com.prestamx.max.R$id;
import com.prestamx.max.R$layout;
import com.prestamx.max.R$string;
import com.prestamx.max.activity.WebHAuthActivity;
import com.prestamx.max.bean.HomeBean;
import com.prestamx.max.bean.HttpBean;
import com.prestamx.max.bean.ShapeBean;
import com.prestamx.max.java_calss.ActivityUtil;
import com.prestamx.max.java_calss.AppUtil;
import com.prestamx.max.room.PointEnum;
import com.prestamx.max.transfer_view.TransferMaterialToolbar;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import kitld.ogbxud;
import kitld.slyvsmo;
import org.json.simple.JSONObject;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

public class WebHAuthActivity extends MaxActivity {

    public TransferMaterialToolbar f13622ksocihbb;

    public kitld.aiyptt f13624ogbxud;

    public ActivityResultLauncher f13626sjdatecqy;

    public WebView f13627vikxvh;

    public ActivityResultLauncher f13628vpqvb;

    public ActivityResultLauncher f13629wavzltwms;

    public int f13621jzzsan = 1;

    public long f13623nqymzx = 0;

    public long f13625qwppmv = 0;

    public boolean f13630yvxno = false;

    public class emazevgh implements Callback {
        public emazevgh() {
        }

        public void onFailure(Call call, Throwable th) {
        }

        public void onResponse(Call call, Response response) {
            ShapeBean shapeBean;
            if (!response.isSuccessful() || response.body() == null || !Objects.equals(((HttpBean) response.body()).tqbmypjx, "200") || (shapeBean = (ShapeBean) ((HttpBean) response.body()).bdwwtyzq) == null || shapeBean.mwowwskti().intValue() != 1 || shapeBean.emazevgh() == null || shapeBean.emazevgh().emazevgh() == null || shapeBean.emazevgh().emazevgh().longValue() <= 0) {
                return;
            }
            WebHAuthActivity.this.f13623nqymzx = shapeBean.emazevgh().emazevgh().longValue();
            WebHAuthActivity.this.f13625qwppmv = System.currentTimeMillis();
        }
    }

    public class mwowwskti extends OnBackPressedCallback {

        public final int f13633mwowwskti;

        public class C0100mwowwskti implements slyvsmo.mwowwskti {
            public C0100mwowwskti() {
            }

            @Override
            public void emazevgh(kitld.slyvsmo slyvsmoVar) {
                slyvsmoVar.dismiss();
            }

            @Override
            public void mwowwskti(kitld.slyvsmo slyvsmoVar) {
                slyvsmoVar.dismiss();
                WebHAuthActivity.this.finish();
            }
        }

        public mwowwskti(boolean z, int i) {
            super(z);
            this.f13633mwowwskti = i;
        }

        public void zppskyagv() {
            WebHAuthActivity.this.f13630yvxno = false;
        }

        @Override
        public void handleOnBackPressed() {
            if (this.f13633mwowwskti != 1) {
                if (WebHAuthActivity.this.f13627vikxvh.canGoBack()) {
                    WebHAuthActivity.this.f13627vikxvh.goBack();
                    return;
                } else {
                    WebHAuthActivity.this.finish();
                    return;
                }
            }
            long currentTimeMillis = WebHAuthActivity.this.f13623nqymzx - ((System.currentTimeMillis() - WebHAuthActivity.this.f13625qwppmv) / 1000);
            if (currentTimeMillis <= 0) {
                new kitld.slyvsmo(WebHAuthActivity.this).sjdatecqy(new C0100mwowwskti()).show();
            } else {
                if (WebHAuthActivity.this.f13630yvxno) {
                    WebHAuthActivity.this.finish();
                    return;
                }
                WebHAuthActivity.this.f13630yvxno = true;
                new kitld.ogbxud(WebHAuthActivity.this).sjdatecqy(currentTimeMillis, new ogbxud.emazevgh() {
                    @Override
                    public final void mwowwskti(kitld.ogbxud ogbxudVar) {
                        ogbxudVar.dismiss();
                    }
                }, new ogbxud.emazevgh() {
                    @Override
                    public final void mwowwskti(kitld.ogbxud ogbxudVar) {
                        ogbxudVar.dismiss();
                    }
                }).show();
                new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        WebHAuthActivity.mwowwskti.this.zppskyagv();
                    }
                }, 15000L);
            }
        }
    }

    public class nmqbnjf implements Callback {
        public nmqbnjf() {
        }

        public void onFailure(Call call, Throwable th) {
            WebHAuthActivity.this.finish();
        }

        public void onResponse(Call call, Response response) {
            HomeBean homeBean;
            if (response.isSuccessful() && response.body() != null) {
                HttpBean httpBean = (HttpBean) response.body();
                if ("200".equals(httpBean.tqbmypjx) && (homeBean = (HomeBean) httpBean.bdwwtyzq) != null && homeBean.zppskyagv() != null) {
                    List mwowwskti2 = homeBean.zppskyagv().mwowwskti();
                    if (!mwowwskti2.isEmpty()) {
                        ArrayList arrayList = new ArrayList();
                        arrayList.add((HomeBean.Tpqdbmc.Ejpheui) mwowwskti2.get(0));
                        ActivityUtil.exkcc(WebHAuthActivity.this, arrayList, 1);
                    }
                }
            }
            WebHAuthActivity.this.finish();
        }
    }

    public static class slyvsmo {

        public TransferMaterialToolbar f13636emazevgh;

        public WebHAuthActivity f13637mwowwskti;

        public long f13638zwfgajm = 0;

        public slyvsmo(WebHAuthActivity webHAuthActivity, TransferMaterialToolbar transferMaterialToolbar) {
            this.f13637mwowwskti = webHAuthActivity;
            this.f13636emazevgh = transferMaterialToolbar;
        }

        public void nmqbnjf(String str) {
            if (this.f13636emazevgh != null) {
                if (str == null || str.isEmpty()) {
                    this.f13636emazevgh.setTitle(R$string.gdmjyk);
                } else {
                    this.f13636emazevgh.setTitle(str);
                }
            }
        }

        public void zwfgajm() {
            this.f13637mwowwskti.yzchl();
        }

        @JavascriptInterface
        public void getMaxCard() {
            this.f13637mwowwskti.mhpint();
        }

        @JavascriptInterface
        public void getMaxContacts() {
            this.f13637mwowwskti.ufluaas();
        }

        @JavascriptInterface
        public String getMaxInfo() {
            HashMap hashMap = new HashMap();
            hashMap.put("wwesdda", "release");
            hashMap.put("asqwdf", 10);
            hashMap.put("ddasvs", com.prestamx.max.java_calss.yyqsz.slyvsmo(com.prestamx.max.java_calss.vikxvh.emazevgh()));
            hashMap.put("aconstyy", com.prestamx.max.java_calss.yyqsz.zppskyagv("sVTMgY/XwQFvgzi/s6saNhaMgGbGiPYzRXmM49Huve8="));
            hashMap.put("peyghumm", hzmc.mwowwskti.nmqbnjf(this.f13637mwowwskti).mwowwskti(""));
            hashMap.put("ieaoivjo", "com.prestamx.max");
            hashMap.put("hyh", "");
            hashMap.put("mlpxdvd", "1.0.9");
            hashMap.put("kkrmvkzb", hzmc.mwowwskti.nmqbnjf(this.f13637mwowwskti).jzzsan());
            hashMap.put("nbborf", AppUtil.f13768mwowwskti);
            hashMap.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("R2iJOQPvbLadFqhcDL0jEw=="), hzmc.mwowwskti.nmqbnjf(this.f13637mwowwskti).wavzltwms());
            return JSONObject.zwfgajm(hashMap);
        }

        @JavascriptInterface
        public void getMaxPhotos(int i) {
            this.f13637mwowwskti.kinq(i);
        }

        @JavascriptInterface
        public void setMaxPage(int i) {
            ActivityUtil.nzpf(this.f13637mwowwskti, i);
        }

        @JavascriptInterface
        public void setMaxSuccess() {
            this.f13637mwowwskti.runOnUiThread(new Runnable() {
                @Override
                public final void run() {
                    WebHAuthActivity.slyvsmo.this.zwfgajm();
                }
            });
        }

        @JavascriptInterface
        public void setMaxTitle(final String str) {
            this.f13637mwowwskti.runOnUiThread(new Runnable() {
                @Override
                public final void run() {
                    WebHAuthActivity.slyvsmo.this.nmqbnjf(str);
                }
            });
        }

        @JavascriptInterface
        public void upMaxCount(int i) {
        }
    }

    public class zwfgajm extends WebViewClient {
        public zwfgajm() {
        }

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

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

    public void dpvu(ActivityResult activityResult) {
        if (activityResult.getResultCode() == -1) {
            try {
                if (activityResult.getData() != null) {
                    xodtgxpxb(activityResult.getData());
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public void gtqexqrj(ActivityResult activityResult) {
        Intent data;
        if (activityResult.getResultCode() != -1 || (data = activityResult.getData()) == null) {
            return;
        }
        gdlglvuk(data);
    }

    public void punms(View view) {
        getOnBackPressedDispatcher().onBackPressed();
    }

    public void rbxfetppi(ActivityResult activityResult) {
        if (activityResult.getResultCode() != -1 || activityResult.getData() == null) {
            return;
        }
        ejsu(activityResult.getData());
    }

    public static void yyxafd(String str) {
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent motionEvent) {
        qpcdhxz.nmqbnjf.vikxvh(PointEnum.POINT_AUTH, motionEvent);
        return super.dispatchTouchEvent(motionEvent);
    }

    public void ejsu(Intent intent) {
        String stringExtra = intent.getStringExtra("knsljbe");
        if (stringExtra != null) {
            Bitmap emazevgh2 = com.prestamx.max.java_calss.wavzltwms.emazevgh(stringExtra);
            if (emazevgh2 == null) {
                AppUtil.slyvsmo(this);
                return;
            }
            String mwowwskti2 = com.prestamx.max.java_calss.wavzltwms.mwowwskti(emazevgh2);
            if (mwowwskti2.isEmpty()) {
                AppUtil.slyvsmo(this);
                return;
            }
            HashMap hashMap = new HashMap();
            hashMap.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("VY3XbS64NY4RK0iC0sxPxA=="), mwowwskti2);
            gagkjk(com.prestamx.max.java_calss.yyqsz.zppskyagv("oBmGmKOfwzyzQbOTRKzmD03PoftkWQlTYWx5uKGFy8o="), JSONObject.zwfgajm(hashMap));
        }
    }

    public void gagkjk(String str, String str2) {
        this.f13627vikxvh.evaluateJavascript("javascript:" + str + "(" + str2 + ")", new ValueCallback() {
            @Override
            public final void onReceiveValue(Object obj) {
                WebHAuthActivity.yyxafd((String) obj);
            }
        });
    }

    public final void gdlglvuk(Intent intent) {
        String str;
        String str2;
        try {
            Cursor query = getContentResolver().query(intent.getData(), new String[]{"display_name", "data1"}, null, null, null);
            if (query != null) {
                if (query.moveToFirst()) {
                    int columnIndex = query.getColumnIndex("display_name");
                    int columnIndex2 = query.getColumnIndex("data1");
                    str2 = query.getString(columnIndex);
                    try {
                        str = query.getString(columnIndex2);
                    } catch (Exception e) {
                        e = e;
                        str = "";
                        e.printStackTrace();
                        AppUtil.slyvsmo(this);
                        HashMap hashMap = new HashMap();
                        hashMap.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("vMOsVYaL/JcuqN2EJAwLYA=="), str2);
                        hashMap.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("2ZwTb+c+RAhkGdEygpNE8Q=="), str.replace("(", "").replace(")", "").replace(" ", "").replace("-", ""));
                        gagkjk(com.prestamx.max.java_calss.yyqsz.zppskyagv("VMaV5jmwzdQjlsJ6G7TE2WSQf2FWwkH4suLVg4Zrn7c="), JSONObject.zwfgajm(hashMap));
                    }
                } else {
                    str = "";
                    str2 = str;
                }
                try {
                    query.close();
                } catch (Exception e2) {
                    e = e2;
                    e.printStackTrace();
                    AppUtil.slyvsmo(this);
                    HashMap hashMap2 = new HashMap();
                    hashMap2.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("vMOsVYaL/JcuqN2EJAwLYA=="), str2);
                    hashMap2.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("2ZwTb+c+RAhkGdEygpNE8Q=="), str.replace("(", "").replace(")", "").replace(" ", "").replace("-", ""));
                    gagkjk(com.prestamx.max.java_calss.yyqsz.zppskyagv("VMaV5jmwzdQjlsJ6G7TE2WSQf2FWwkH4suLVg4Zrn7c="), JSONObject.zwfgajm(hashMap2));
                }
            } else {
                str = "";
                str2 = str;
            }
        } catch (Exception e3) {
            e = e3;
            str = "";
            str2 = str;
        }
        HashMap hashMap22 = new HashMap();
        hashMap22.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("vMOsVYaL/JcuqN2EJAwLYA=="), str2);
        hashMap22.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("2ZwTb+c+RAhkGdEygpNE8Q=="), str.replace("(", "").replace(")", "").replace(" ", "").replace("-", ""));
        gagkjk(com.prestamx.max.java_calss.yyqsz.zppskyagv("VMaV5jmwzdQjlsJ6G7TE2WSQf2FWwkH4suLVg4Zrn7c="), JSONObject.zwfgajm(hashMap22));
    }

    public void kamfujg() {
        kitld.aiyptt aiypttVar = this.f13624ogbxud;
        if (aiypttVar == null || !aiypttVar.isShowing()) {
            return;
        }
        this.f13624ogbxud.dismiss();
    }

    public void kinq(int i) {
        this.f13621jzzsan = i;
        if (i == 1) {
            Intent intent = new Intent("android.intent.action.PICK");
            intent.setType("image/*");
            intent.putExtra("android.intent.extra.ALLOW_MULTIPLE", false);
            this.f13626sjdatecqy.launch(intent);
            return;
        }
        Intent intent2 = new Intent("android.intent.action.PICK");
        intent2.setType("image/*");
        intent2.putExtra("android.intent.extra.ALLOW_MULTIPLE", true);
        this.f13626sjdatecqy.launch(intent2);
    }

    public void mhpint() {
        this.f13628vpqvb.launch(ActivityUtil.ogbxud(this));
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_web_h);
        this.f13624ogbxud = new kitld.aiyptt(this);
        this.f13627vikxvh = (WebView) findViewById(R$id.webView);
        int intExtra = getIntent().getIntExtra("gnuwxy", 1);
        getOnBackPressedDispatcher().addCallback(new mwowwskti(true, intExtra));
        TransferMaterialToolbar transferMaterialToolbar = (TransferMaterialToolbar) findViewById(R$id.toolbar);
        this.f13622ksocihbb = transferMaterialToolbar;
        transferMaterialToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WebHAuthActivity.this.punms(view);
            }
        });
        yvuwlzzb();
        if (intExtra == 1) {
            PointEnum pointEnum = PointEnum.POINT_AUTH;
            qpcdhxz.nmqbnjf.etol(pointEnum, this);
            qpcdhxz.nmqbnjf.zwfgajm(pointEnum, 2);
            this.f13622ksocihbb.setTitle(R$string.gdmjyk);
            this.f13627vikxvh.loadUrl(AppUtil.f13773qwppmv);
        } else if (intExtra == 2) {
            ActivityUtil.wdmirpab(this, 23);
            this.f13627vikxvh.loadUrl(AppUtil.f13779yvxno);
        } else if (intExtra != 3) {
            AppUtil.slyvsmo(this);
        } else {
            ActivityUtil.wdmirpab(this, 10);
            this.f13622ksocihbb.setNavigationActionVisibility(false);
            this.f13627vikxvh.loadUrl(AppUtil.f13771ogbxud);
        }
        com.prestamx.max.java_calss.vikxvh.zppskyagv().zves(com.prestamx.max.java_calss.vikxvh.mwowwskti(this, new HashMap())).enqueue(new emazevgh());
    }

    @Override
    public void onDestroy() {
        kamfujg();
        this.f13624ogbxud = null;
        qpcdhxz.nmqbnjf.mwowwskti(PointEnum.POINT_AUTH);
        super.onDestroy();
    }

    @Override
    public void onStop() {
        super.onStop();
        ActivityUtil.etol(this);
    }

    public void ufluaas() {
        try {
            Intent intent = new Intent("android.intent.action.PICK");
            intent.addCategory("android.intent.category.DEFAULT");
            intent.setType("vnd.android.cursor.dir/phone_v2");
            this.f13629wavzltwms.launch(intent);
        } catch (Exception e) {
            e.printStackTrace();
            AppUtil.slyvsmo(this);
        }
    }

    public void xodtgxpxb(Intent intent) {
        Uri data;
        ArrayList arrayList = new ArrayList();
        ClipData clipData = intent.getClipData();
        if (clipData != null && clipData.getItemCount() > 0) {
            for (int i = 0; i < clipData.getItemCount() && i < this.f13621jzzsan; i++) {
                arrayList.add(com.prestamx.max.java_calss.wavzltwms.mwowwskti(com.prestamx.max.java_calss.wavzltwms.zwfgajm(BitmapFactory.decodeStream(getContentResolver().openInputStream(clipData.getItemAt(i).getUri())))));
            }
        }
        if (arrayList.isEmpty() && (data = intent.getData()) != null) {
            arrayList.add(com.prestamx.max.java_calss.wavzltwms.mwowwskti(com.prestamx.max.java_calss.wavzltwms.zwfgajm(BitmapFactory.decodeStream(getContentResolver().openInputStream(data)))));
        }
        HashMap hashMap = new HashMap();
        hashMap.put(com.prestamx.max.java_calss.yyqsz.zppskyagv("VY3XbS64NY4RK0iC0sxPxA=="), arrayList);
        gagkjk(com.prestamx.max.java_calss.yyqsz.zppskyagv("9TqUGzSIQ4wS2tnoG5svLg=="), JSONObject.zwfgajm(hashMap));
    }

    public void xuuuvdsc() {
        kitld.aiyptt aiypttVar = this.f13624ogbxud;
        if (aiypttVar == null || aiypttVar.isShowing()) {
            return;
        }
        this.f13624ogbxud.show();
    }

    public final void yvuwlzzb() {
        this.f13627vikxvh.setWebChromeClient(new WebChromeClient());
        this.f13627vikxvh.setWebViewClient(new zwfgajm());
        WebSettings settings = this.f13627vikxvh.getSettings();
        settings.setJavaScriptEnabled(true);
        this.f13627vikxvh.setScrollBarStyle(0);
        this.f13627vikxvh.getSettings().setMixedContentMode(0);
        settings.setJavaScriptCanOpenWindowsAutomatically(true);
        settings.setDefaultTextEncodingName("UTF-8");
        settings.setCacheMode(-1);
        settings.setBuiltInZoomControls(false);
        settings.setUseWideViewPort(true);
        settings.setLoadWithOverviewMode(true);
        settings.setSupportZoom(false);
        settings.setSupportMultipleWindows(true);
        settings.setDomStorageEnabled(true);
        settings.setLoadsImagesAutomatically(true);
        this.f13627vikxvh.addJavascriptInterface(new slyvsmo(this, this.f13622ksocihbb), com.prestamx.max.java_calss.yyqsz.zppskyagv("LW8nva6LoJLHSYJo/DeIgA=="));
        this.f13629wavzltwms = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            @Override
            public final void onActivityResult(Object obj) {
                WebHAuthActivity.this.gtqexqrj((ActivityResult) obj);
            }
        });
        this.f13628vpqvb = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            @Override
            public final void onActivityResult(Object obj) {
                WebHAuthActivity.this.rbxfetppi((ActivityResult) obj);
            }
        });
        this.f13626sjdatecqy = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            @Override
            public final void onActivityResult(Object obj) {
                WebHAuthActivity.this.dpvu((ActivityResult) obj);
            }
        });
    }

    public final void yzchl() {
        xuuuvdsc();
        qpcdhxz.nmqbnjf.zwfgajm(PointEnum.POINT_AUTH, 1);
        com.prestamx.max.java_calss.vikxvh.zppskyagv().lcivfdpk(com.prestamx.max.java_calss.vikxvh.mwowwskti(this, new HashMap())).enqueue(new nmqbnjf());
    }
}