From 2b64c5a6f70bfae7db95f763441b52a506d6f630 Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Mon, 19 Mar 2012 13:56:49 -0700 Subject: Don't allow enter full screen while still in full screen mode. bug:5504581 Change-Id: Ib4922ce2cdb89b24120f87177658ce94c483f118 --- core/java/android/webkit/HTML5VideoViewProxy.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index 1644b0671ad2..40c377890015 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -146,6 +146,12 @@ class HTML5VideoViewProxy extends Handler // Save the inline video info and inherit it in the full screen int savePosition = 0; if (mHTML5VideoView != null) { + // We don't allow enter full screen mode while the previous + // full screen video hasn't finished yet. + if (!mHTML5VideoView.fullScreenExited() && mHTML5VideoView.isFullScreenMode()) { + Log.w(LOGTAG, "Try to reenter the full screen mode"); + return; + } // If we are playing the same video, then it is better to // save the current position. if (layerId == mHTML5VideoView.getVideoLayerId()) { -- cgit v1.2.3-59-g8ed1b