大漢易經書院.apk(点击下载) / a.java


package com.lt.app.views;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.support.v4.widget.SwipeRefreshLayout;
import android.text.TextUtils;
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.c.e;
import com.c.h;
import com.lt.app.App;
import com.lt.app.a.e;
import com.lt.app.a.j;
import com.lt.app.a.k;
import com.lt.app.a.m;
import com.lt.app.a.o;
import com.lt.app.c;
import com.lt.app.c.n;
import com.lt.app.d;
import com.lt.plugin.b;
import com.xiaomi.mipush.sdk.Constants;
import me.dhtv.app.R;

/* compiled from: ContentView */
public class a {

    /* renamed from: ʻ  reason: contains not printable characters */
    private final com.lt.plugin.a f6340;

    /* renamed from: ʼ  reason: contains not printable characters */
    private final SwipeRefreshLayout f6341;

    /* renamed from: ʽ  reason: contains not printable characters */
    private boolean f6342 = true;

    /* renamed from: ʾ  reason: contains not printable characters */
    private com.lt.app.b.a f6343;

    /* renamed from: ʿ  reason: contains not printable characters */
    private AbstractC0081a f6344;

    /* renamed from: ˆ  reason: contains not printable characters */
    private com.lt.app.c.a f6345;

    /* renamed from: ˈ  reason: contains not printable characters */
    private PopupWindow f6346 = null;

    /* renamed from: ˉ  reason: contains not printable characters */
    private boolean f6347;

    /* renamed from: ˊ  reason: contains not printable characters */
    private e f6348;

    /* renamed from: com.lt.app.views.a$a  reason: collision with other inner class name */
    /* compiled from: ContentView */
    public interface AbstractC0081a {
        /* renamed from: ʻ  reason: contains not printable characters */
        void m8641(e eVar, String str);

        /* renamed from: ʼ  reason: contains not printable characters */
        void m8642(e eVar, String str);
    }

    public a(com.lt.plugin.a aVar) {
        this.f6340 = aVar;
        this.f6341 = (SwipeRefreshLayout) aVar.findViewById(R.id.swipe_layout);
        m8615();
    }

    /* renamed from: ʽ  reason: contains not printable characters */
    private void m8615() {
        e r0 = d.m8557(this.f6340);
        this.f6348 = r0;
        r0.setLayoutParams(new ViewGroup.LayoutParams(-1, -1));
        this.f6341.addView(this.f6348.getViewEx());
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public void m8627(AbstractC0081a aVar) {
        this.f6344 = aVar;
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public e m8623() {
        return this.f6348;
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public void m8626(n nVar) {
        if (nVar != null) {
            if (nVar.visible) {
                PopupWindow popupWindow = this.f6346;
                if (popupWindow == null || !popupWindow.isShowing()) {
                    m r4 = m.m8372(this.f6340, nVar.style, nVar.foregroundColor, nVar.backgroundColor);
                    this.f6346 = r4;
                    r4.showAtLocation(this.f6348.getViewEx(), 17, 0, 0);
                    return;
                }
                return;
            }
            PopupWindow popupWindow2 = this.f6346;
            if (popupWindow2 != null) {
                if (popupWindow2.isShowing()) {
                    this.f6346.dismiss();
                }
                this.f6346 = null;
            }
        }
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public void m8624(com.lt.app.c.a aVar, boolean z, o oVar) {
        this.f6345 = aVar;
        this.f6347 = z;
        this.f6348.m6430(App.m8130().m8136(z), aVar.ua, aVar.uaExt);
        m8618();
        m8612(oVar);
        m8617();
    }

    /* renamed from: ʾ  reason: contains not printable characters */
    private void m8617() {
        final m mVar = null;
        final ProgressBar progressBar = this.f6345.ls == 1 ? (ProgressBar) this.f6340.findViewById(R.id.progressBar) : null;
        if (this.f6345.ls > 1) {
            mVar = m.m8371(this.f6340, this.f6345.ls);
        }
        final AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);
        alphaAnimation.setDuration(1500);
        alphaAnimation.setFillAfter(true);
        AnonymousClass1 r2 = new h() {
            /* class com.lt.app.views.a.AnonymousClass1 */

            @Override // com.lt.app.views.h
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8630(final ValueCallback<Uri[]> valueCallback, Intent intent, String[] strArr) {
                int i;
                if (App.m8121(18, true)) {
                    String type = c.m8485(intent, strArr).getType();
                    if (type == null) {
                        type = "";
                    }
                    if (strArr != null && strArr.length > 0) {
                        for (String str : strArr) {
                            type = type + str + Constants.ACCEPT_TIME_SEPARATOR_SP;
                        }
                    }
                    int r2 = c.m8507(type);
                    i = !a.this.f6345.m8521(18) ? 2 : 0;
                    if (!a.this.f6345.m8522(1) && (r2 & 8) == 8) {
                        i |= 8;
                    }
                    if (!a.this.f6345.m8522(2) && (r2 & 4) == 4) {
                        i |= 4;
                    }
                } else {
                    i = 0;
                }
                if ((intent == null || !intent.getBooleanExtra("k_is_capture_enabled", false)) && !a.this.f6345.m8521(19)) {
                    i |= 1;
                }
                com.lt.app.a.e.m8265(a.this.f6340, i, intent, strArr, new e.a() {
                    /* class com.lt.app.views.a.AnonymousClass1.AnonymousClass1 */

                    @Override // com.lt.app.a.e.a
                    /* renamed from: ʻ  reason: contains not printable characters */
                    public void m8636(Uri[] uriArr) {
                        ValueCallback valueCallback = valueCallback;
                        if (valueCallback != null) {
                            valueCallback.onReceiveValue(uriArr);
                        }
                    }
                });
            }

            @Override // com.lt.app.views.h
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8632(com.c.e eVar, String str) {
                if (a.this.f6344 != null) {
                    a.this.f6344.m8641(eVar, str);
                }
                com.lt.app.e.m8576(a.this.f6348);
            }

            @Override // com.lt.app.views.h
            /* renamed from: ʻ  reason: contains not printable characters */
            public boolean m8634(com.c.e eVar, h hVar) {
                String r0 = o.m8382(hVar.f4542);
                if ("browser".equals(r0) || a.this.f6345.page.m8530(hVar.f4542)) {
                    d.m8553((Context) a.this.f6340, hVar.f4542, eVar.getUrl(), true);
                    return true;
                }
                if (!App.m8130().m8137()) {
                    d.m8563(a.this.f6340, (int) R.string.e_no_net);
                }
                if (a.this.f6342 && !"self".equals(r0) && !a.this.f6345.page.m8528(hVar.f4542) && !hVar.f4544 && hVar.f4546 && !hVar.f4545) {
                    if (("blank".equals(r0) || a.this.f6345.page.m8529(hVar.f4542)) && !hVar.f4542.equals(eVar.getUrl())) {
                        d.m8553((Context) a.this.f6340, hVar.f4542, eVar.getUrl(), false);
                        return true;
                    } else if (a.this.f6345.m8521(2)) {
                        d.m8553((Context) a.this.f6340, hVar.f4542, eVar.getUrl(), false);
                        return true;
                    }
                }
                return false;
            }

            @Override // com.lt.app.views.h
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8633(com.c.e eVar, String str, Bitmap bitmap) {
                PopupWindow popupWindow;
                if (!a.this.f6340.isFinishing()) {
                    if (a.this.f6344 != null) {
                        a.this.f6344.m8642(a.this.f6348, str);
                    }
                    if (!TextUtils.isEmpty(str) && str.startsWith("http")) {
                        ProgressBar progressBar = progressBar;
                        if (progressBar != null) {
                            progressBar.setProgress(8);
                            progressBar.clearAnimation();
                            progressBar.setVisibility(0);
                        } else if (!a.this.f6340.isFinishing() && (popupWindow = mVar) != null && !popupWindow.isShowing() && d.m8555(str) && a.this.f6348.getViewEx().getWidth() > 0) {
                            mVar.showAtLocation(a.this.f6348.getViewEx(), 17, 0, 0);
                        }
                    }
                }
            }

            @Override // com.lt.app.views.h
            /* renamed from: ʼ  reason: contains not printable characters */
            public void m8635(com.c.e eVar, String str) {
                com.lt.app.e.m8576(a.this.f6348);
                ProgressBar progressBar = progressBar;
                if (progressBar != null) {
                    progressBar.startAnimation(alphaAnimation);
                } else {
                    PopupWindow popupWindow = mVar;
                    if (popupWindow != null && popupWindow.isShowing()) {
                        mVar.dismiss();
                    }
                }
                a.this.f6348.m6432();
            }

            @Override // com.lt.app.views.h
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8631(com.c.e eVar, int i) {
                com.lt.app.e.m8576(a.this.f6348);
                String url = eVar.getUrl();
                if (!TextUtils.isEmpty(url) && url.startsWith("http")) {
                    ProgressBar progressBar = progressBar;
                    if (progressBar != null) {
                        progressBar.setProgress(Math.max(i, 8));
                        if (i == 100) {
                            progressBar.startAnimation(alphaAnimation);
                            return;
                        }
                        return;
                    }
                    PopupWindow popupWindow = mVar;
                    if (popupWindow != null && popupWindow.isShowing() && i > 80) {
                        mVar.dismiss();
                    }
                }
            }
        };
        com.c.e eVar = this.f6348;
        eVar.setWebChromeClient(new f(eVar, r2) {
            /* class com.lt.app.views.a.AnonymousClass2 */

            /* renamed from: ʼ  reason: contains not printable characters */
            private WebChromeClient.CustomViewCallback f6356 = null;

            @Override // com.c.d, com.lt.app.views.f
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8637(View view, WebChromeClient.CustomViewCallback customViewCallback) {
                if (view != null) {
                    a.this.f6348.getViewEx().setVisibility(8);
                    a.this.f6343 = new com.lt.app.b.a();
                    a.this.f6343.m8457(a.this.f6340.m1697(), view, new b<android.support.v4.app.e>() {
                        /* class com.lt.app.views.a.AnonymousClass2.AnonymousClass1 */

                        /* renamed from: ʻ  reason: contains not printable characters */
                        public void callback(android.support.v4.app.e eVar) {
                            AnonymousClass2.this.m8638();
                        }
                    });
                    this.f6356 = customViewCallback;
                    super.m8700(view, customViewCallback);
                }
            }

            @Override // com.c.d, com.lt.app.views.f
            /* renamed from: ʼ  reason: contains not printable characters */
            public void m8638() {
                if (a.this.f6343 != null) {
                    a.this.f6343.m1672();
                    a.this.f6343 = null;
                }
                WebChromeClient.CustomViewCallback customViewCallback = this.f6356;
                if (customViewCallback != null) {
                    customViewCallback.onCustomViewHidden();
                }
                a.this.f6348.getViewEx().setVisibility(0);
                super.m8709();
            }
        });
        this.f6348.setWebViewClient(new g(this.f6348, r2));
        e.m8682(this.f6348, this.f6345);
    }

    /* renamed from: ʿ  reason: contains not printable characters */
    private void m8618() {
        if (this.f6345.m8521(8)) {
            k.m8316(this.f6348);
        }
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    private void m8612(o oVar) {
        boolean z = true;
        if (!App.m8121(3, true) || (oVar == null || !oVar.f6163 ? this.f6345.m8521(3) : !oVar.f6164)) {
            z = false;
        }
        this.f6341.setEnabled(z);
        this.f6341.setOnRefreshListener(new SwipeRefreshLayout.b() {
            /* class com.lt.app.views.a.AnonymousClass3 */

            @Override // android.support.v4.widget.SwipeRefreshLayout.b
            /* renamed from: ʻ  reason: contains not printable characters */
            public void m8640() {
                if (!d.m8555(a.this.f6348.getUrl())) {
                    a.this.f6341.setRefreshing(false);
                    return;
                }
                if (!a.this.f6347 || !a.this.f6345.m8521(6) || !a.this.f6345.url.equals(a.this.f6348.getUrl())) {
                    a.this.f6348.reload();
                } else {
                    j.m8311(new j.a() {
                        /* class com.lt.app.views.a.AnonymousClass3.AnonymousClass1 */

                        @Override // com.lt.app.a.j.a
                        public void onCompleted() {
                            a.this.f6348.reload();
                        }
                    }, a.this.f6348);
                }
                a.this.f6341.setRefreshing(false);
            }
        });
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public void m8625(com.lt.app.c.j jVar) {
        boolean z = true;
        if (!App.m8121(3, true) || !jVar.page.enablePullRefresh) {
            z = false;
        }
        this.f6341.setEnabled(z);
        this.f6342 = jVar.multipleWindow;
        this.f6348.loadUrl(jVar.url, null);
    }

    /* renamed from: ʼ  reason: contains not printable characters */
    public boolean m8629() {
        com.lt.app.b.a aVar = this.f6343;
        if (aVar == null) {
            return false;
        }
        aVar.m1672();
        this.f6343 = null;
        return true;
    }

    /* renamed from: ʻ  reason: contains not printable characters */
    public void m8628(boolean z) {
        this.f6341.setEnabled(z);
    }
}