am a7605d3b: am 2d09b855: Merge "When the video is not on the front, it should be paused" into honeycomb-mr1

* commit 'a7605d3b2ec9526fc369e5e0a1a37880db2c0694':
  When the video is not on the front, it should be paused
This commit is contained in:
Teng-Hui Zhu
2011-03-23 17:36:03 -07:00
committed by Android Git Automerger

View File

@@ -109,7 +109,7 @@ class HTML5VideoViewProxy extends Handler
boolean foundInTree = nativeSendSurfaceTexture(surfTexture,
layer, currentVideoLayerId, textureName,
playerState);
if (playerState == HTML5VideoView.STATE_PREPARED
if (playerState >= HTML5VideoView.STATE_PREPARED
&& !foundInTree) {
mHTML5VideoView.pauseAndDispatch(mCurrentProxy);
mHTML5VideoView.deleteSurfaceTexture();