华为花瓣钱包 v1.0.2版本的 MD5 值为:c0e3970801a3515a68304949cc5ad531

以下内容为反编译后的 e0.java 源代码,内容仅作参考


package com.lt.app.views;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Size;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import com.lt.app.App;
import com.lt.app.t0.o0;
import com.lt.app.t0.s0;
import com.lt.app.t0.t0;
import com.lt.app.t0.x0;
import com.lt.app.t0.z0;
import com.lt.app.views.e0;
import com.lt.plugin.b0;
import f.q.b.c;
import java.util.List;
import me.zhanghai.android.materialprogressbar.BuildConfig;
import me.zhanghai.android.materialprogressbar.R;
import org.json.JSONObject;
public class e0 {
    private final com.lt.plugin.y f4787;
    private final f.q.b.c f4788;
    private final g.g.f f4789;
    private com.lt.app.u0.e f4790;
    private c f4791;
    private com.lt.app.v0.a f4792;
    private PopupWindow f4793 = null;
    private boolean f4794;

    public class b extends m0 {
        private WebChromeClient.CustomViewCallback f4799;

        b(g.g.f fVar, o0 o0Var) {
            super(fVar, o0Var);
            this.f4799 = null;
        }

        private void m5613(final com.lt.plugin.a0<Size> a0Var) {
            e0.this.f4789.evaluateJavascript("javascript:(function() {\n    var res = {};\n    try {\n        var e = document.fullscreenElement;\n        if (e && e.tagName && 'VIDEO' == e.tagName.toUpperCase()) {\n            res = {\n                w: e.videoWidth,\n                h: e.videoHeight\n            };\n        }\n    } catch {}\n    return JSON.stringify(res);\n})()", new ValueCallback() {
                @Override
                public final void onReceiveValue(Object obj) {
                    e0.b.m5614(com.lt.plugin.a0.this, (String) obj);
                }
            });
        }

        public void m5619(final View view, final WebChromeClient.CustomViewCallback customViewCallback) {
            m5613(new com.lt.plugin.a0() {
                @Override
                public final void mo5289(Object obj) {
                    e0.b.this.m5617(view, customViewCallback, (Size) obj);
                }
            });
        }

        public static void m5614(com.lt.plugin.a0 a0Var, String str) {
            int i2;
            JSONObject jSONObject;
            int optInt;
            int i3 = 0;
            if (!TextUtils.isEmpty(str)) {
                try {
                    jSONObject = new JSONObject(str);
                    i2 = jSONObject.optInt("w");
                } catch (Exception e2) {
                    e = e2;
                    i2 = 0;
                }
                try {
                    i3 = i2;
                    optInt = jSONObject.optInt("h");
                } catch (Exception e3) {
                    e = e3;
                    e.printStackTrace();
                    i3 = i2;
                    optInt = 0;
                    a0Var.mo5289(new Size(i3, optInt));
                }
                a0Var.mo5289(new Size(i3, optInt));
            }
            optInt = 0;
            a0Var.mo5289(new Size(i3, optInt));
        }

        private void m5612(View view, boolean z, WebChromeClient.CustomViewCallback customViewCallback) {
            e0.this.f4790 = new com.lt.app.u0.e();
            e0.this.f4790.f4743 = z;
            e0.this.f4790.m5550(e0.this.f4787.m2389(), view, new com.lt.plugin.a0() {
                @Override
                public final void mo5289(Object obj) {
                    e0.b.this.m5618((androidx.fragment.app.n) obj);
                }
            });
            this.f4799 = customViewCallback;
        }

        public void m5618(androidx.fragment.app.n nVar) {
            mo5615();
        }

        @Override
        public void mo5616(final View view, final WebChromeClient.CustomViewCallback customViewCallback) {
            if (view == null) {
                return;
            }
            new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
                @Override
                public final void run() {
                    e0.b.this.m5619(view, customViewCallback);
                }
            }, 100L);
        }

        public void m5617(View view, WebChromeClient.CustomViewCallback customViewCallback, Size size) {
            m5612(view, size.getHeight() > size.getWidth(), customViewCallback);
        }

        @Override
        public void mo5615() {
            if (e0.this.f4790 != null) {
                e0.this.f4790.m2371();
                e0.this.f4790 = null;
            }
            WebChromeClient.CustomViewCallback customViewCallback = this.f4799;
            if (customViewCallback != null) {
                customViewCallback.onCustomViewHidden();
                this.f4799 = null;
            }
            super.mo5615();
        }
    }

    public interface c {
        void mo5218(g.g.f fVar, String str);

        void mo5221(g.g.f fVar, String str);
    }

    public e0(com.lt.plugin.y yVar, ViewGroup viewGroup) {
        this.f4787 = yVar;
        g.g.f m5332 = com.lt.app.r0.m5332(yVar);
        this.f4789 = m5332;
        m5332.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
        View viewEx = this.f4789.getViewEx();
        if (viewEx != null) {
            if (yVar.getResources().getBoolean(R.bool.hideVScroll)) {
                viewEx.setVerticalScrollBarEnabled(false);
            }
            if (yVar.getResources().getBoolean(R.bool.hideHScroll)) {
                viewEx.setHorizontalScrollBarEnabled(false);
            }
        }
        if (App.m5176(3, true)) {
            f.q.b.c cVar = new f.q.b.c(yVar);
            this.f4788 = cVar;
            cVar.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
            this.f4788.addView(viewEx);
            viewEx = this.f4788;
        } else {
            this.f4788 = null;
        }
        viewGroup.addView(viewEx, 0);
    }

    private void m5595() {
        ProgressBar progressBar = this.f4792.ls == 1 ? (ProgressBar) this.f4787.findViewById(R.id.progressBar) : null;
        int i2 = this.f4792.ls;
        x0 m5540 = i2 > 1 ? x0.m5540(this.f4787, i2) : null;
        AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);
        alphaAnimation.setDuration(1500L);
        alphaAnimation.setFillAfter(true);
        a aVar = new a(progressBar, m5540, alphaAnimation);
        g.g.f fVar = this.f4789;
        fVar.setWebChromeClient(new b(fVar, aVar));
        this.f4789.setWebViewClient(new n0(this.f4789, aVar));
        i0.m5666(this.f4789, this.f4792);
    }

    private void m5594() {
        if (this.f4792.m5563(8)) {
            t0.m5487(this.f4789);
        }
    }

    public boolean m5602() {
        com.lt.app.u0.e eVar = this.f4790;
        if (eVar != null) {
            eVar.m2371();
            this.f4790 = null;
            return true;
        }
        return false;
    }

    public void m5603() {
        this.f4789.reload();
    }

    public void m5604() {
        if (!com.lt.app.r0.m5353(this.f4789.getUrl())) {
            this.f4788.setRefreshing(false);
            return;
        }
        if (this.f4794 && this.f4792.m5563(6) && this.f4792.url.equals(this.f4789.getUrl())) {
            com.lt.app.t0.s0.m5484(new s0.c() {
                @Override
                public final void mo5291() {
                    e0.this.m5603();
                }
            }, this.f4789);
        } else {
            this.f4789.reload();
        }
        this.f4788.setRefreshing(false);
    }

    public void m5600(c cVar) {
        this.f4791 = cVar;
    }

    public g.g.f m5596() {
        return this.f4789;
    }

    public void m5599(com.lt.app.v0.o oVar) {
        if (oVar == null) {
            return;
        }
        if (oVar.visible) {
            PopupWindow popupWindow = this.f4793;
            if (popupWindow == null || !popupWindow.isShowing()) {
                x0 m5541 = x0.m5541(this.f4787, oVar.style, oVar.foregroundColor, oVar.backgroundColor);
                this.f4793 = m5541;
                m5541.showAtLocation(this.f4789.getViewEx(), 17, 0, 0);
                return;
            }
            return;
        }
        PopupWindow popupWindow2 = this.f4793;
        if (popupWindow2 != null) {
            if (popupWindow2.isShowing()) {
                this.f4793.dismiss();
            }
            this.f4793 = null;
        }
    }

    public class a extends o0 {
        final ProgressBar f4795;
        final PopupWindow f4796;
        final AlphaAnimation f4797;

        a(ProgressBar progressBar, PopupWindow popupWindow, AlphaAnimation alphaAnimation) {
            this.f4795 = progressBar;
            this.f4796 = popupWindow;
            this.f4797 = alphaAnimation;
        }

        @Override
        public void mo5606(final ValueCallback<Uri[]> valueCallback, Intent intent, String[] strArr) {
            int i2;
            if (App.m5176(18, true)) {
                String type = intent != null ? intent.getType() : BuildConfig.FLAVOR;
                if (strArr != null && strArr.length > 0) {
                    type = type + defpackage.c.m3764(";", strArr);
                    if (intent != null) {
                        intent.setType(defpackage.c.m3764(",", strArr));
                    }
                }
                List<b0.b> m5767 = com.lt.plugin.b0.m5767(type);
                i2 = !e0.this.f4792.m5563(18) ? 2 : 0;
                if (!e0.this.f4792.m5566(1) && m5767.contains(b0.b.Video)) {
                    i2 |= 8;
                }
                if (!e0.this.f4792.m5566(2) && m5767.contains(b0.b.Audio)) {
                    i2 |= 4;
                }
            } else {
                i2 = 0;
            }
            if ((intent == null || !intent.getBooleanExtra("k_is_capture_enabled", false)) && !e0.this.f4792.m5563(19)) {
                i2 |= 1;
            }
            com.lt.app.t0.o0.m5466(e0.this.f4787, i2, intent, new o0.a() {
                @Override
                public final void mo5472(Uri[] uriArr) {
                    e0.a.m5605(valueCallback, uriArr);
                }
            });
        }

        @Override
        public void mo5611(g.g.f fVar, String str) {
            if (e0.this.f4791 != null) {
                e0.this.f4791.mo5218(fVar, str);
            }
            com.lt.app.s0.m5368(e0.this.f4789);
        }

        public static void m5605(ValueCallback valueCallback, Uri[] uriArr) {
            if (valueCallback != null) {
                valueCallback.onReceiveValue(uriArr);
            }
        }

        @Override
        public boolean mo5610(g.g.f fVar, g.g.i iVar) {
            if (TextUtils.isEmpty(iVar.f7179) || !iVar.f7179.equals(fVar.getUrl())) {
                String m5548 = z0.m5548(iVar.f7179);
                if ("browser".equals(m5548) || e0.this.f4792.page.m5571(iVar.f7179)) {
                    com.lt.app.r0.m5346((Context) e0.this.f4787, iVar.f7179, fVar.getUrl(), true);
                    return true;
                }
                if (!App.m5183().m5212() && !e0.this.f4792.m5566(18)) {
                    com.lt.app.r0.m5356(e0.this.f4787, (int) R.string.e_no_net);
                }
                if (!iVar.f7181 && iVar.f7183 && !iVar.f7182) {
                    if ("blank".equals(m5548) || e0.this.f4792.page.m5570(iVar.f7179)) {
                        com.lt.app.r0.m5346((Context) e0.this.f4787, iVar.f7179, fVar.getUrl(), false);
                        return true;
                    } else if (!"self".equals(m5548) && !e0.this.f4792.page.m5572(iVar.f7179) && e0.this.f4792.m5563(2)) {
                        com.lt.app.r0.m5346((Context) e0.this.f4787, iVar.f7179, fVar.getUrl(), false);
                        return true;
                    }
                }
                return false;
            }
            return false;
        }

        @Override
        public void mo5609(g.g.f fVar, String str, Bitmap bitmap) {
            PopupWindow popupWindow;
            if (e0.this.f4787.isFinishing()) {
                return;
            }
            if (e0.this.f4791 != null) {
                e0.this.f4791.mo5221(e0.this.f4789, str);
            }
            if (TextUtils.isEmpty(str) || !str.startsWith("http")) {
                return;
            }
            ProgressBar progressBar = this.f4795;
            if (progressBar == null) {
                if (e0.this.f4787.isFinishing() || (popupWindow = this.f4796) == null || popupWindow.isShowing() || !com.lt.app.r0.m5353(str) || e0.this.f4789.getViewEx().getWidth() <= 0) {
                    return;
                }
                this.f4796.showAtLocation(e0.this.f4789.getViewEx(), 17, 0, 0);
                return;
            }
            progressBar.setProgress(8);
            this.f4795.clearAnimation();
            this.f4795.setVisibility(0);
        }

        @Override
        public void mo5608(g.g.f fVar, String str) {
            com.lt.app.s0.m5368(e0.this.f4789);
            ProgressBar progressBar = this.f4795;
            if (progressBar != null) {
                progressBar.startAnimation(this.f4797);
            } else {
                PopupWindow popupWindow = this.f4796;
                if (popupWindow != null && popupWindow.isShowing()) {
                    this.f4796.dismiss();
                }
            }
            e0.this.f4789.mo8288();
        }

        @Override
        public void mo5607(g.g.f fVar, int i2) {
            com.lt.app.s0.m5368(e0.this.f4789);
            String url = fVar.getUrl();
            if (TextUtils.isEmpty(url) || !url.startsWith("http")) {
                return;
            }
            ProgressBar progressBar = this.f4795;
            if (progressBar != null) {
                progressBar.setProgress(Math.max(i2, 8));
                if (i2 == 100) {
                    this.f4795.startAnimation(this.f4797);
                    return;
                }
                return;
            }
            PopupWindow popupWindow = this.f4796;
            if (popupWindow == null || !popupWindow.isShowing() || i2 <= 80) {
                return;
            }
            this.f4796.dismiss();
        }
    }

    public void m5597(com.lt.app.v0.a aVar, boolean z, z0 z0Var) {
        this.f4792 = aVar;
        this.f4794 = z;
        this.f4789.mo8290(App.m5183().m5189(z), aVar.ua, aVar.uaExt);
        m5594();
        m5589(z0Var);
        m5595();
    }

    private void m5589(z0 z0Var) {
        if (this.f4788 == null) {
            return;
        }
        this.f4788.setEnabled((z0Var == null || !z0Var.f4727) ? !this.f4792.m5563(3) : z0Var.f4728);
        this.f4788.setOnRefreshListener(new c.j() {
            @Override
            public final void mo5620() {
                e0.this.m5604();
            }
        });
    }

    public void m5598(com.lt.app.v0.k kVar) {
        f.q.b.c cVar = this.f4788;
        if (cVar != null) {
            cVar.setEnabled(kVar.page.enablePullRefresh);
        }
        boolean z = kVar.multipleWindow;
        this.f4789.loadUrl(kVar.url, null);
    }

    public void m5601(boolean z) {
        f.q.b.c cVar = this.f4788;
        if (cVar != null) {
            cVar.setEnabled(z);
        }
    }
}