private void stayAwake(boolean awake) {
        if (mWakeLock != null) {
            if (awake && !mWakeLock.isHeld()) {
                mWakeLock.acquire();
            } else if (!awake && mWakeLock.isHeld()) {
                mWakeLock.release();
            }
        }
        mStayAwake = awake;
        updateSurfaceScreenOn();
    }
@see android.media.MediaPlayer#setScreenOnWhilePlaying(boolean)
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaPlayer.java