Java Code Examples for android.view.SurfaceHolder#setKeepScreenOn()

The following examples show how to use android.view.SurfaceHolder#setKeepScreenOn() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FimiMediaPlayer.java    From FimiX8-RE with MIT License 5 votes vote down vote up
private void updateSurfaceScreenOn() {
    if (this.mSurfaceHolder != null) {
        SurfaceHolder surfaceHolder = this.mSurfaceHolder;
        boolean z = this.mScreenOnWhilePlaying && this.mStayAwake;
        surfaceHolder.setKeepScreenOn(z);
    }
}
 
Example 2
Source File: FimiMediaPlayer.java    From FimiX8-RE with MIT License 5 votes vote down vote up
private void updateSurfaceScreenOn() {
    if (this.mSurfaceHolder != null) {
        SurfaceHolder surfaceHolder = this.mSurfaceHolder;
        boolean z = this.mScreenOnWhilePlaying && this.mStayAwake;
        surfaceHolder.setKeepScreenOn(z);
    }
}
 
Example 3
Source File: FFMpegPlayer.java    From letv with Apache License 2.0 5 votes vote down vote up
private void updateSurfaceScreenOn() {
    if (this.mSurfaceHolder != null) {
        SurfaceHolder surfaceHolder = this.mSurfaceHolder;
        boolean z = this.mScreenOnWhilePlaying && this.mStayAwake;
        surfaceHolder.setKeepScreenOn(z);
    }
}
 
Example 4
Source File: VideoView.java    From BambooPlayer with Apache License 2.0 4 votes vote down vote up
@Override
public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
	holder.setKeepScreenOn(true);
	if (mListener != null)
		mListener.onSurfaceChanged(holder, format, width, height);
}