Skip to content

Commit 2b64c5a

Browse files
author
Teng-Hui Zhu
committed
Don't allow enter full screen while still in full screen mode.
bug:5504581 Change-Id: Ib4922ce2cdb89b24120f87177658ce94c483f118
1 parent f6b8f7b commit 2b64c5a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/java/android/webkit/HTML5VideoViewProxy.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ public static void enterFullScreenVideo(int layerId, String url,
146146
// Save the inline video info and inherit it in the full screen
147147
int savePosition = 0;
148148
if (mHTML5VideoView != null) {
149+
// We don't allow enter full screen mode while the previous
150+
// full screen video hasn't finished yet.
151+
if (!mHTML5VideoView.fullScreenExited() && mHTML5VideoView.isFullScreenMode()) {
152+
Log.w(LOGTAG, "Try to reenter the full screen mode");
153+
return;
154+
}
149155
// If we are playing the same video, then it is better to
150156
// save the current position.
151157
if (layerId == mHTML5VideoView.getVideoLayerId()) {

0 commit comments

Comments
 (0)