From efb882cf75eef39ecaf9f8920ed302a019fa629f Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Fri, 5 Mar 2010 10:14:33 -0800 Subject: [PATCH] Release mediaplayer if the current state is not suspending. Fix for bug 2480093. --- core/java/android/widget/VideoView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java index c2517a8496042..fb8b5aa938da4 100644 --- a/core/java/android/widget/VideoView.java +++ b/core/java/android/widget/VideoView.java @@ -484,6 +484,9 @@ public class VideoView extends SurfaceView implements MediaPlayerControl { // after we return from this we can't use the surface any more mSurfaceHolder = null; if (mMediaController != null) mMediaController.hide(); + if (mCurrentState != STATE_SUSPEND) { + release(true); + } } };