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

Commit 1a88acbe authored by Teng-Hui Zhu's avatar Teng-Hui Zhu
Browse files

Correctly detect when switching back from full screen

In full screen mode, the play message can be trigger, that means we can't
assume that the play message only comes from inline mode.

bug:4498120

Change-Id: Ibf85bb74778df207a6ce786dc63b0845356a281c
parent 3fafd39d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -199,6 +199,9 @@ public class HTML5VideoFullScreen extends HTML5VideoView
        mVideoSurfaceView.getHolder().setFixedSize(mVideoWidth, mVideoHeight);
    }

    public boolean fullScreenExited() {
        return (mLayout == null);
    }

    private final WebChromeClient.CustomViewCallback mCallback =
        new WebChromeClient.CustomViewCallback() {
+5 −0
Original line number Diff line number Diff line
@@ -320,4 +320,9 @@ public class HTML5VideoView implements MediaPlayer.OnPreparedListener {
        return false;
    }

    public boolean fullScreenExited() {
        // Only meaningful for HTML5VideoFullScreen
        return false;
    }

}
+1 −3
Original line number Diff line number Diff line
@@ -173,9 +173,7 @@ class HTML5VideoViewProxy extends Handler
            boolean backFromFullScreenMode = false;
            if (mHTML5VideoView != null) {
                currentVideoLayerId = mHTML5VideoView.getVideoLayerId();
                if (mHTML5VideoView instanceof HTML5VideoFullScreen) {
                    backFromFullScreenMode = true;
                }
                backFromFullScreenMode = mHTML5VideoView.fullScreenExited();
            }

            if (backFromFullScreenMode