diff options
| author | Teng-Hui Zhu <ztenghui@google.com> | 2011-06-30 16:15:04 -0700 |
|---|---|---|
| committer | Teng-Hui Zhu <ztenghui@google.com> | 2011-06-30 16:44:47 -0700 |
| commit | b1c2c1e3c7bde3c40d7510fbda4ef8112396dd22 (patch) | |
| tree | 26bd3b87be4c5ddb95b33eb67d1c8cc63174b39d /core/java/android/webkit/HTML5VideoFullScreen.java | |
| parent | 9c902c1aa3ecaa7e601aae81ca812743eb6488f3 (diff) | |
Release the media player when exiting the full screen
Once we switch out from full screen mode, the player will be re-created for the
next video, we should release the sources as early as possible.
bug:4332676
Change-Id: I4c26523b3600d3100f81e422979236fca57beb7c
Diffstat (limited to 'core/java/android/webkit/HTML5VideoFullScreen.java')
| -rw-r--r-- | core/java/android/webkit/HTML5VideoFullScreen.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java index 11ab0d778043..0ea27a0b9f5e 100644 --- a/core/java/android/webkit/HTML5VideoFullScreen.java +++ b/core/java/android/webkit/HTML5VideoFullScreen.java @@ -107,6 +107,7 @@ public class HTML5VideoFullScreen extends HTML5VideoView // After we return from this we can't use the surface any more. // The current Video View will be destroy when we play a new video. pauseAndDispatch(mProxy); + mPlayer.release(); mSurfaceHolder = null; if (mMediaController != null) { mMediaController.hide(); @@ -226,6 +227,10 @@ public class HTML5VideoFullScreen extends HTML5VideoView mProxy.getWebView().getViewManager().showAll(); mProxy = null; + + // Don't show the controller after exiting the full screen. + mMediaController = null; + mCurrentState = STATE_RELEASED; } }; |
