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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user