This commit is contained in:
Kartikey Kushwaha 2018-06-09 01:01:13 +05:30
parent bb0d8ad58a
commit 981174a490
1 changed files with 5 additions and 1 deletions

View File

@ -662,7 +662,8 @@ public final class PopupVideoPlayer extends Service {
videoPlayPause.setBackgroundResource(R.drawable.ic_pause_white);
lockManager.acquireWifiAndCpu();
hideControls(DEFAULT_CONTROLS_DURATION, DEFAULT_CONTROLS_HIDE_TIME);
windowLayoutParams.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams);
}
@Override
@ -677,6 +678,9 @@ public final class PopupVideoPlayer extends Service {
updateNotification(R.drawable.ic_play_arrow_white);
videoPlayPause.setBackgroundResource(R.drawable.ic_play_arrow_white);
lockManager.releaseWifiAndCpu();
windowLayoutParams.flags = 0;
windowManager.updateViewLayout(playerImpl.getRootView(), windowLayoutParams);
}
@Override