导航菜单

页面标题

页面副标题

PrestaMax v1.0.9 - WebHActivity.java 源代码

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

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


package com.prestamx.max.activity;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.prestamx.max.R$id;
import com.prestamx.max.R$layout;
import com.prestamx.max.bean.AgreementBean;
import com.prestamx.max.bean.HttpBean;
import com.prestamx.max.java_calss.ActivityUtil;
import com.prestamx.max.java_calss.AppUtil;
import com.prestamx.max.transfer_view.TransferMaterialToolbar;
import java.util.ArrayList;
import java.util.HashMap;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

public class WebHActivity extends MaxActivity {

    public class emazevgh implements Callback {

        public final kitld.aiyptt f13616emazevgh;

        public final WebView f13617mwowwskti;

        public emazevgh(WebView webView, kitld.aiyptt aiypttVar) {
            this.f13617mwowwskti = webView;
            this.f13616emazevgh = aiypttVar;
        }

        public void onFailure(Call call, Throwable th) {
            WebHActivity.this.rubjtuopd(this.f13616emazevgh, th);
        }

        public void onResponse(Call call, Response response) {
            if (!response.isSuccessful() || response.body() == null) {
                WebHActivity.this.momzvk(this.f13616emazevgh, response);
                return;
            }
            HttpBean httpBean = (HttpBean) response.body();
            if (!"200".equals(httpBean.tqbmypjx)) {
                AppUtil.slyvsmo(WebHActivity.this);
                return;
            }
            AgreementBean agreementBean = (AgreementBean) httpBean.bdwwtyzq;
            if (agreementBean.mwowwskti() == null || agreementBean.mwowwskti().isEmpty()) {
                AppUtil.slyvsmo(WebHActivity.this);
            } else {
                this.f13617mwowwskti.loadDataWithBaseURL(null, agreementBean.mwowwskti(), "text/html", "utf-8", null);
            }
        }
    }

    public class mwowwskti extends WebChromeClient {

        public final kitld.aiyptt f13620mwowwskti;

        public mwowwskti(kitld.aiyptt aiypttVar) {
            this.f13620mwowwskti = aiypttVar;
        }

        @Override
        public void onProgressChanged(WebView webView, int i) {
            super.onProgressChanged(webView, i);
            if (i <= 10 && !this.f13620mwowwskti.isShowing()) {
                this.f13620mwowwskti.show();
            } else {
                if (i <= 90 || !this.f13620mwowwskti.isShowing()) {
                    return;
                }
                this.f13620mwowwskti.dismiss();
            }
        }
    }

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

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_web_h);
        String stringExtra = getIntent().getStringExtra(ActivityUtil.f13757zwfgajm);
        String stringExtra2 = getIntent().getStringExtra(ActivityUtil.f13753nmqbnjf);
        String stringExtra3 = getIntent().getStringExtra(ActivityUtil.f13754slyvsmo);
        String[] stringArrayExtra = getIntent().getStringArrayExtra(ActivityUtil.f13756zppskyagv);
        TransferMaterialToolbar transferMaterialToolbar = (TransferMaterialToolbar) findViewById(R$id.toolbar);
        transferMaterialToolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WebHActivity.this.iypf(view);
            }
        });
        transferMaterialToolbar.setTitle(stringExtra);
        WebView webView = (WebView) findViewById(R$id.webView);
        kitld.aiyptt aiypttVar = new kitld.aiyptt(this);
        webView.setWebChromeClient(new mwowwskti(aiypttVar));
        webView.setWebViewClient(new WebViewClient());
        if (stringExtra2 != null && !stringExtra2.isEmpty()) {
            webView.loadUrl(stringExtra2);
            return;
        }
        if (stringExtra3 != null && !stringExtra3.isEmpty()) {
            webView.getSettings().setDefaultFontSize(12);
            webView.loadDataWithBaseURL(null, stringExtra3, "text/html", "utf-8", null);
            return;
        }
        if (stringArrayExtra == null || stringArrayExtra.length <= 0) {
            AppUtil.slyvsmo(this);
            finish();
            return;
        }
        HashMap hashMap = new HashMap();
        ArrayList arrayList = new ArrayList();
        for (String str : stringArrayExtra) {
            arrayList.add(str);
        }
        hashMap.put("ybn", arrayList);
        com.prestamx.max.java_calss.vikxvh.zppskyagv().rubjtuopd(com.prestamx.max.java_calss.vikxvh.mwowwskti(this, hashMap)).enqueue(new emazevgh(webView, aiypttVar));
    }
}