Merge "Don't sleep when inline video start"

This commit is contained in:
Teng-Hui Zhu
2011-09-08 15:41:54 -07:00
committed by Android (Google) Code Review

View File

@@ -7,6 +7,7 @@ import android.webkit.HTML5VideoView;
import android.webkit.HTML5VideoViewProxy; import android.webkit.HTML5VideoViewProxy;
import android.view.Surface; import android.view.Surface;
import android.opengl.GLES20; import android.opengl.GLES20;
import android.os.PowerManager;
/** /**
* @hide This is only used by the browser * @hide This is only used by the browser
@@ -51,6 +52,7 @@ public class HTML5VideoInline extends HTML5VideoView{
public void prepareDataAndDisplayMode(HTML5VideoViewProxy proxy) { public void prepareDataAndDisplayMode(HTML5VideoViewProxy proxy) {
super.prepareDataAndDisplayMode(proxy); super.prepareDataAndDisplayMode(proxy);
setFrameAvailableListener(proxy); setFrameAvailableListener(proxy);
mPlayer.setWakeMode(proxy.getContext(), PowerManager.FULL_WAKE_LOCK);
} }
// Pause the play and update the play/pause button // Pause the play and update the play/pause button