Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 592b2a65 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu
Browse files

Fix a NPE if the Chrome Client is not setup

This can happen when applications are using WebView to show HTML5 video in
full screen mode while not setting up WebChromeClient correctly.

Change-Id: I6575e3364f04f6eaf800f854d60992fe6c3be651
parent 622d5441
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView
        mLayout.setVisibility(View.VISIBLE);

        WebChromeClient client = webView.getWebChromeClient();
        if (client != null) {
            client.onShowCustomView(mLayout, mCallback);
            // Plugins like Flash will draw over the video so hide
            // them while we're playing.
@@ -264,7 +265,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView
                mLayout.addView(mProgressView, layoutParams);
                mProgressView.setVisibility(View.VISIBLE);
            }

        }
    }

    /**