Skip to content

Commit

Permalink
Fix screen going to sleep if the emulator was running
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelvcaetano committed Aug 13, 2023
1 parent 4b8def8 commit 16f87fc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,11 @@ class EmulatorActivity : AppCompatActivity() {
}

private fun disableScreenTimeOut() {
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}

private fun enableScreenTimeOut() {
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}

override fun dispatchKeyEvent(event: KeyEvent): Boolean {
Expand Down

0 comments on commit 16f87fc

Please sign in to comment.