am 46a83b4e: Make the VideoView go away automatically at the end of playback.

Merge commit '46a83b4ead517b9fc13b4bee4c59c3eaf4d3fdd9' into eclair-mr2-plus-aosp

* commit '46a83b4ead517b9fc13b4bee4c59c3eaf4d3fdd9':
  Make the VideoView go away automatically at the end of playback.
This commit is contained in:
Andrei Popescu
2009-10-23 07:29:27 -07:00
committed by Android Git Automerger

View File

@@ -199,6 +199,8 @@ class HTML5VideoViewProxy extends Handler
public void playbackEnded() { public void playbackEnded() {
Message msg = Message.obtain(mWebCoreHandler, ENDED); Message msg = Message.obtain(mWebCoreHandler, ENDED);
mWebCoreHandler.sendMessage(msg); mWebCoreHandler.sendMessage(msg);
// also send a message to ourselves to return to the WebView
sendMessage(obtainMessage(ENDED));
} }
// Handler for the messages from WebCore thread to the UI thread. // Handler for the messages from WebCore thread to the UI thread.
@@ -224,6 +226,7 @@ class HTML5VideoViewProxy extends Handler
VideoPlayer.pause(this); VideoPlayer.pause(this);
break; break;
} }
case ENDED:
case ERROR: { case ERROR: {
WebChromeClient client = mWebView.getWebChromeClient(); WebChromeClient client = mWebView.getWebChromeClient();
if (client != null) { if (client != null) {