From 31d2aa1e17f1ee580edb762a6ef634098bba02bb Mon Sep 17 00:00:00 2001 From: Andrei Popescu Date: Thu, 8 Apr 2010 15:19:22 +0100 Subject: Avoid calling proxy.playbackEnded() again in onCustomViewHidden(). It is now always called via the MediaPlayer.onCompletion() callback. Fix b: 2533272 Change-Id: If86cf6b2ab355ddcd976cd6a2ad92ce071a1af33 --- core/java/android/webkit/HTML5VideoViewProxy.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/java/android/webkit/HTML5VideoViewProxy.java') diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java index 42e153988a21..eee80251fd5d 100644 --- a/core/java/android/webkit/HTML5VideoViewProxy.java +++ b/core/java/android/webkit/HTML5VideoViewProxy.java @@ -129,9 +129,10 @@ class HTML5VideoViewProxy extends Handler // is invoked. mTimer.cancel(); mTimer = null; - mCurrentProxy.playbackEnded(); + if (mVideoView.isPlaying()) { + mVideoView.stopPlayback(); + } mCurrentProxy = null; - mVideoView.stopPlayback(); mLayout.removeView(mVideoView); mVideoView = null; if (mProgressView != null) { -- cgit v1.2.3