导航菜单

页面标题

页面副标题

MX Player v1.97.8 - ActivityWebBrowser.java 源代码

正在查看: MX Player v1.97.8 应用的 ActivityWebBrowser.java JAVA 源代码文件

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


package com.mxtech.videoplayer;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.microsoft.identity.common.java.AuthenticationConstants;
import com.microsoft.identity.common.java.WarningType;
import defpackage.cti;
import defpackage.tya;
import defpackage.yh;
import defpackage.yki;
import defpackage.z6h;

@SuppressLint({"SetJavaScriptEnabled"})
public class ActivityWebBrowser extends yh {
    public WebView R;

    public class a extends q4b {
        public a() {
        }

        public final void onCloseWindow(WebView webView) {
            ActivityWebBrowser.this.finish();
        }

        public final void onProgressChanged(WebView webView, int i) {
            ActivityWebBrowser activityWebBrowser = ActivityWebBrowser.this;
            if (i == 100) {
                activityWebBrowser.setTitle(webView.getTitle());
                return;
            }
            activityWebBrowser.setTitle(webView.getTitle() + " (" + i + "%)");
        }
    }

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

        @Override
        public final void onPageFinished(WebView webView, String str) {
            ActivityWebBrowser.this.setTitle(webView.getTitle());
        }

        @Override
        public final void onReceivedError(WebView webView, int i, String str, String str2) {
            z6h.d(ActivityWebBrowser.this, str, false);
        }

        @Override
        public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
            Uri parse = Uri.parse(str);
            String scheme = parse.getScheme();
            if (!"http".equalsIgnoreCase(scheme) && !AuthenticationConstants.HTTPS_PROTOCOL_STRING.equalsIgnoreCase(scheme)) {
                try {
                    ActivityWebBrowser.this.startActivity(new Intent("android.intent.action.VIEW", parse));
                    return true;
                } catch (Exception e) {
                    Log.e("MX.WebBrowser", "", e);
                }
            }
            return false;
        }
    }

    @Override
    public final void onBackPressed() {
        wc wcVar = this.t;
        if (wcVar != null) {
            wcVar.c();
        } else {
            if (this.R.canGoBack()) {
                this.R.goBack();
                return;
            }
            try {
                super.onBackPressed();
            } catch (IllegalStateException unused) {
                finish();
            }
        }
    }

    @Override
    @SuppressLint({WarningType.NewApi, "MissingSuperCall"})
    public final void onCreate(Bundle bundle) {
        String dataString;
        D6(2131558428, bundle);
        this.R = (WebView) findViewById(2131362817);
        if (((tya) getApplication()).y(this)) {
            WebSettings settings = this.R.getSettings();
            settings.setJavaScriptEnabled(true);
            settings.setUseWideViewPort(true);
            this.R.setWebChromeClient(new a());
            this.R.setWebViewClient(new b());
            if (bundle != null || (dataString = getIntent().getDataString()) == null) {
                return;
            }
            this.R.loadUrl(dataString);
        }
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        yki.d(this.R);
        this.R.destroy();
        this.R = null;
    }

    public final void onRestart() {
        super/*android.app.Activity*/.onRestart();
    }

    public final void onRestoreInstanceState(Bundle bundle) {
        super/*android.app.Activity*/.onRestoreInstanceState(bundle);
        this.R.restoreState(bundle);
    }

    public final void onSaveInstanceState(Bundle bundle) {
        super/*ub3*/.onSaveInstanceState(bundle);
        this.R.saveState(bundle);
    }

    @Override
    public final void onStart() {
        super.onStart();
        synchronized (cti.class) {
        }
    }

    @Override
    public final void onStop() {
        super.onStop();
        synchronized (cti.class) {
        }
    }
}