Release mediaplayer if the current state is not suspending. Fix for bug 2480093.
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index c2517a8..fb8b5aa 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -484,6 +484,9 @@
// 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);
+ }
}
};