导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - VideoInstructionActivity.java 源代码

正在查看: bbinstant v6.24.0 应用的 VideoInstructionActivity.java JAVA 源代码文件

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


package com.bigbasket.bbinstant.ui.help;

import android.graphics.Bitmap;
import android.net.http.SslError;
import android.os.Bundle;
import android.webkit.HttpAuthHandler;
import android.webkit.SslErrorHandler;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.bigbasket.bbinstant.ui.BaseActivity;
import com.google.android.material.snackbar.Snackbar;

public class VideoInstructionActivity extends BaseActivity {
    private WebView mWebView;

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

        @Override
        public void onPageFinished(WebView webView, String str) {
            super.onPageFinished(webView, str);
        }

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

        @Override
        public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
            super.onReceivedError(webView, webResourceRequest, webResourceError);
            if (webResourceError.getDescription().equals("net::ERR_FAILED")) {
                return;
            }
            Snackbar.make(VideoInstructionActivity.this.mWebView, "Something went wrong.", -1).show();
        }

        @Override
        public void onReceivedHttpAuthRequest(WebView webView, HttpAuthHandler httpAuthHandler, String str, String str2) {
            super.onReceivedHttpAuthRequest(webView, httpAuthHandler, str, str2);
        }

        @Override
        public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
            super.onReceivedSslError(webView, sslErrorHandler, sslError);
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558454);
        WebView webView = (WebView) findViewById(2131362817);
        this.mWebView = webView;
        webView.getSettings().setJavaScriptEnabled(true);
        this.mWebView.setWebViewClient(new a());
        this.mWebView.setWebChromeClient(new WebChromeClient());
        String videoUrl = com.bigbasket.bbinstant.core.persistance.d.get().getSettings().getVideoUrl();
        if (videoUrl == null || videoUrl.isEmpty()) {
            finish();
        }
        this.mWebView.loadUrl(videoUrl);
    }
}