Live Football Updates v1.0.1版本的 MD5 值为:636649089335ebb37514551724606ad0

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


package x6;

import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.JsResult;
import android.webkit.URLUtil;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.d;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.millingoupdate.app.R;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import w1.y0;
public abstract class o extends x6.a implements SwipeRefreshLayout.f {
    public static final int f33570h0 = 0;
    public SwipeRefreshLayout V;
    public FrameLayout W;
    public WebView X;
    public a Y;
    public ImageView Z;
    public FrameLayout f33571a0;
    public int f33572b0;
    public int f33573c0;
    public int d0;
    public boolean f0;
    public boolean f33574e0 = true;
    public final m f33575g0 = new m(0, this);

    public class a extends f7.d {
        public a(View view, ViewGroup viewGroup) {
            super(view, viewGroup);
        }

        @Override
        public final boolean onJsAlert(WebView webView, String str, String str2, JsResult jsResult) {
            return false;
        }

        @Override
        public final void onProgressChanged(WebView webView, int i) {
        }
    }

    public static class b extends WebViewClient {
        public final WeakReference<o> f33576a;

        public b(o oVar) {
            this.f33576a = new WeakReference<>(oVar);
        }

        @Override
        public final void onLoadResource(WebView webView, String str) {
            o oVar = this.f33576a.get();
            if (oVar != null && !oVar.isDestroyed() && !oVar.isFinishing()) {
                try {
                    String z02 = x6.a.z0(x6.a.y0(oVar.l0()));
                    if (!TextUtils.isEmpty(z02)) {
                        webView.evaluateJavascript(z02, null);
                    }
                } catch (Exception unused) {
                }
                if ((oVar.n0().isEmpty() || oVar.o0().isEmpty()) && str.contains(".ts")) {
                    FrameLayout frameLayout = oVar.f33571a0;
                    if (frameLayout != null) {
                        frameLayout.setVisibility(8);
                    }
                    ImageView imageView = oVar.Z;
                    if (imageView != null) {
                        imageView.setVisibility(8);
                    }
                }
            }
            super.onLoadResource(webView, str);
        }

        @Override
        public final void onPageFinished(WebView webView, String str) {
            long j4;
            o oVar = this.f33576a.get();
            if (oVar != null && !oVar.isDestroyed() && !oVar.isFinishing()) {
                FrameLayout frameLayout = oVar.f33571a0;
                if (frameLayout != null) {
                    frameLayout.setVisibility(8);
                }
                ImageView imageView = oVar.Z;
                if (imageView != null) {
                    imageView.setVisibility(8);
                }
                try {
                    String z02 = x6.a.z0(x6.a.y0(oVar.l0()));
                    if (!TextUtils.isEmpty(z02)) {
                        webView.evaluateJavascript(z02, null);
                    }
                } catch (Exception unused) {
                }
                try {
                    String z03 = x6.a.z0(x6.a.y0(oVar.m0()));
                    if (!TextUtils.isEmpty(z03)) {
                        if (z03.startsWith("javascript:")) {
                            webView.loadUrl(z03);
                        } else {
                            webView.evaluateJavascript(z03, null);
                        }
                    }
                } catch (Exception unused2) {
                }
                Handler handler = new Handler();
                j.u uVar = new j.u(oVar, 9, webView);
                o6.c W = oVar.W();
                if (W != null) {
                    j4 = W.f27681z;
                } else {
                    j4 = 1000;
                }
                handler.postDelayed(uVar, j4);
            }
            super.onPageFinished(webView, str);
        }

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

        @Override
        public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
            o oVar = this.f33576a.get();
            if (oVar != null && !oVar.isDestroyed() && !oVar.isFinishing()) {
                webView.setBackgroundColor(oVar.q0());
                webView.setOnLongClickListener(new n(0));
                if (oVar.f33574e0 && !i7.r.c(oVar)) {
                    oVar.f33574e0 = false;
                    Toast.makeText(oVar, oVar.getString(R.string.error_msg_not_network_connection), 0).show();
                }
            }
            super.onReceivedError(webView, webResourceRequest, webResourceError);
        }

        @Override
        public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
            o oVar = this.f33576a.get();
            if (oVar != null && !oVar.isDestroyed() && !oVar.isFinishing()) {
                int i = o.f33570h0;
                return oVar.G0(webResourceRequest);
            }
            return super.shouldInterceptRequest(webView, webResourceRequest);
        }

        @Override
        public final boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
            boolean z10;
            o oVar = this.f33576a.get();
            if (oVar != null && !oVar.isDestroyed() && !oVar.isFinishing()) {
                String uri = webResourceRequest.getUrl().toString();
                if (i7.l.H(uri, oVar.X())) {
                    i7.l.d(oVar, uri);
                    return true;
                } else if (!i7.l.H(uri, oVar.h0())) {
                    return true;
                } else {
                    o6.c W = oVar.W();
                    if (W != null && W.f27670n) {
                        z10 = true;
                    } else {
                        z10 = false;
                    }
                    if (!z10) {
                        return false;
                    }
                    oVar.L0(uri);
                    return true;
                }
            }
            return super.shouldOverrideUrlLoading(webView, webResourceRequest);
        }
    }

    public final ck.f J0(String str, HashMap hashMap) throws IOException {
        if (!hashMap.isEmpty()) {
            ak.d b10 = zj.d.b(str);
            b10.b(hashMap);
            b10.f990a.f999h = true;
            b10.c((int) TimeUnit.SECONDS.toMillis(120L));
            return b10.a();
        }
        ak.d b11 = zj.d.b(str);
        b11.f990a.f999h = true;
        b11.c((int) TimeUnit.SECONDS.toMillis(120L));
        return b11.a();
    }

    public final void K0() {
        boolean z10;
        boolean z11;
        String str;
        try {
            com.bumptech.glide.b.b(this).c(this).k(this.A.getString("thumb", "https://dummy.lM9OSQ9ttBQ.w3bs1t3/file-f4k3.jpg")).l(R.color.night_100).e(R.color.night_100).B(this.Z);
        } catch (Exception unused) {
        }
        FrameLayout frameLayout = this.f33571a0;
        if (frameLayout != null) {
            frameLayout.setVisibility(0);
        }
        ImageView imageView = this.Z;
        if (imageView != null) {
            imageView.setVisibility(8);
        }
        String f0 = f0();
        o6.c W = W();
        if (W != null && W.f27669m) {
            z10 = true;
        } else {
            z10 = false;
        }
        if (z10) {
            L0(f0);
            return;
        }
        o6.c W2 = W();
        if (W2 != null && W2.f27677v) {
            z11 = true;
        } else {
            z11 = false;
        }
        if (z11) {
            jk.a.a(ah.a.PUSH_MINIFIED_BUTTONS_LIST).a("loadIFrameData() url = %s", f0);
            ck.f b10 = dk.f.a().b(be.h.e("<!doctype html><html><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_asset/style_video.css\"></head><body><div class=\"bodywrap_x\"><div class=\"content_x\">", "<div class=\"videoBox widescreen vimeo\"><iframe id=\"player\" width=\"100%\" height=\"100%\" src=\"" + f0 + "\" scrolling=\"no\" frameborder=\"0\" allowfullscreen allowtransparency></iframe></div>", "</div></div></body></html>"), "");
            ck.o j02 = b10.q0().j0("iframe");
            if (j02 != null && j02.s() && ((ck.o) j02.f4318a).f4299d.f21833a.equals("div")) {
                ((ck.o) j02.f4318a).e("style", "background-color: #000;");
            }
            String c02 = b10.c0();
            try {
                URL url = new URL(f0);
                String T = T();
                if (!TextUtils.isEmpty(T) && (URLUtil.isHttpsUrl(T) || URLUtil.isHttpUrl(T))) {
                    url = new URL(T);
                }
                str = url.getProtocol() + "://" + url.getHost();
            } catch (Exception unused2) {
                str = "https://example.com";
            }
            this.X.loadDataWithBaseURL(str, c02, "text/html", "UTF-8", null);
            return;
        }
        HashMap r02 = r0();
        if (!r02.isEmpty()) {
            this.X.loadUrl(f0, r02);
        } else {
            this.X.loadUrl(f0);
        }
    }

    public final void L0(String str) {
        jk.a.a(ah.a.PUSH_MINIFIED_BUTTONS_LIST).a("loadDataWithJSoup() url = %s", str);
        Executors.newSingleThreadExecutor();
        ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(3);
        new Handler(Looper.getMainLooper());
        newFixedThreadPool.execute(new y0(this, 12, str));
    }

    @Override
    public final int a0() {
        return R.layout.activity_player_web;
    }

    @Override
    public final void onBackPressed() {
        a aVar = this.Y;
        if (aVar == null || !aVar.a()) {
            if (!this.B) {
                super.onBackPressed();
            } else {
                N(this);
            }
        }
    }

    @Override
    public void onClickModuleButton(View view) {
        List<o6.c> g02;
        super.onClickModuleButton(view);
        if (view.getId() == R.id.server_btn && (g02 = g0()) != null && !g02.isEmpty()) {
            String[] strArr = new String[g02.size()];
            for (int i = 0; i < g02.size(); i++) {
                strArr[i] = i0(g02.get(i));
            }
            final int i10 = x6.a.U;
            d.a aVar = new d.a(this);
            String string = getString(R.string.dialog_server_title);
            SpannableStringBuilder r10 = i7.l.r(this, string, getString(R.string.dialog_server_message));
            if (r10 != null) {
                TextView textView = new TextView(this);
                int f10 = i7.l.f(this, 22.0f);
                textView.setPadding(f10, f10, f10, 0);
                textView.setText(r10);
                aVar.f1113a.f1087e = textView;
                TypedValue typedValue = new TypedValue();
                getTheme().resolveAttribute(R.attr.appTextColorPrimary, typedValue, true);
                textView.setTextColor(typedValue.data);
            } else {
                aVar.setTitle(string);
            }
            aVar.a(strArr, i10, new DialogInterface.OnClickListener() {
                @Override
                public final void onClick(DialogInterface dialogInterface, int i11) {
                    o oVar = o.this;
                    oVar.getClass();
                    if (!Objects.equals(Integer.valueOf(i10), Integer.valueOf(i11))) {
                        oVar.f0 = false;
                        List<o6.c> g03 = oVar.g0();
                        if (g03 != null && !g03.isEmpty() && !oVar.f0) {
                            WebView webView = oVar.X;
                            if (webView != null) {
                                webView.stopLoading();
                            }
                            oVar.f0 = true;
                            String b02 = oVar.b0();
                            a.U = i11;
                            if (Objects.equals(b02, oVar.b0())) {
                                oVar.K0();
                            } else {
                                oVar.F0(oVar.M());
                            }
                        }
                    }
                    dialogInterface.dismiss();
                }
            });
            aVar.create().show();
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        SwipeRefreshLayout swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
        this.V = swipeRefreshLayout;
        boolean z10 = true;
        swipeRefreshLayout.setColorSchemeResources(i7.l.s(this, true));
        this.V.setProgressBackgroundColorSchemeResource(i7.l.s(this, false));
        this.V.setOnRefreshListener(this);
        View findViewById = findViewById(R.id.nonVideoFullscreenLayout);
        ViewGroup viewGroup = (ViewGroup) findViewById(R.id.videoFullscreenLayout);
        this.Z = (ImageView) findViewById(R.id.thumbImg);
        this.f33571a0 = (FrameLayout) findViewById(R.id.progressContainer);
        this.W = (FrameLayout) findViewById(R.id.webViewContainer);
        this.X = new WebView(getApplicationContext());
        this.W.removeAllViews();
        this.W.addView(this.X);
        CookieManager.getInstance().setAcceptCookie(true);
        CookieManager.getInstance().setAcceptThirdPartyCookies(this.X, true);
        String p02 = p0();
        if (TextUtils.isEmpty(p02)) {
            p02 = i7.u.w(this);
            if (TextUtils.isEmpty(p02)) {
                p02 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36";
            }
        }
        if (!TextUtils.isEmpty(p02)) {
            String d0 = d0();
            String e02 = e0();
            if (!TextUtils.isEmpty(d0) && !TextUtils.isEmpty(e02)) {
                String p10 = i7.l.p(d0, e02);
                if (!TextUtils.isEmpty(p10)) {
                    p02 = be.h.d(p10, p02);
                }
            } else {
                String j02 = j0();
                if (!TextUtils.isEmpty(j02) && !p02.startsWith(j02)) {
                    p02 = be.h.d(j02, p02);
                }
                String k02 = k0();
                if (!TextUtils.isEmpty(k02) && !p02.startsWith(k02)) {
                    p02 = be.h.d(p02, k02);
                }
            }
        }
        WebSettings settings = this.X.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setDomStorageEnabled(true);
        settings.setUserAgentString(p02);
        settings.setBuiltInZoomControls(false);
        settings.setDisplayZoomControls(false);
        settings.setLoadsImagesAutomatically(true);
        o6.c W = W();
        if (W == null || !W.f27674r) {
            z10 = false;
        }
        settings.setMediaPlaybackRequiresUserGesture(z10);
        settings.setJavaScriptCanOpenWindowsAutomatically(false);
        this.X.setBackgroundColor(-16777216);
        this.X.setHapticFeedbackEnabled(false);
        this.X.setOnLongClickListener(new l(0));
        WebView.setWebContentsDebuggingEnabled(false);
        a aVar = new a(findViewById, viewGroup);
        this.Y = aVar;
        aVar.f22681f = new d7.o(2, this);
        if (x0()) {
            this.X.setWebChromeClient(this.Y);
        }
        this.X.setWebViewClient(new b(this));
        K0();
        B0(i7.u.l(), x6.a.u0(i7.u.l()));
    }

    @Override
    public final void onDestroy() {
        i7.t.W(this, this.f33575g0);
        super.onDestroy();
        try {
            FrameLayout frameLayout = this.W;
            if (frameLayout != null) {
                frameLayout.removeAllViews();
            }
            WebView webView = this.X;
            if (webView != null) {
                webView.loadUrl("about:blank");
                this.X.clearHistory();
                this.X.clearCache(true);
                this.X.setWebChromeClient(null);
                this.X.onPause();
                this.X.removeAllViews();
                this.X.destroyDrawingCache();
                this.X.destroy();
                this.X = null;
            }
        } catch (Exception unused) {
        }
    }

    @Override
    public final void onPause() {
        super.onPause();
        WebView webView = this.X;
        if (webView != null) {
            webView.onPause();
        }
    }

    @Override
    public final void onResume() {
        super.onResume();
        i7.t.l(this, this.f33575g0);
        WebView webView = this.X;
        if (webView != null) {
            webView.onResume();
        }
    }
}