summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gloria Wang <gwang@google.com> 2010-03-05 10:14:33 -0800
committer Gloria Wang <gwang@google.com> 2010-03-05 10:14:33 -0800
commitefb882cf75eef39ecaf9f8920ed302a019fa629f (patch)
treead4fc60bdf147b98e067ebc94e4f4979014d35ea
parent55535c83fd1409a9bafcc4ee69a7df2aec36f65c (diff)
Release mediaplayer if the current state is not suspending. Fix for bug 2480093.
-rw-r--r--core/java/android/widget/VideoView.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index c2517a849604..fb8b5aa938da 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);
+ }
}
};