There is no need to clear the flag when the option is not enabled

This commit is contained in:
SUPERYAO
2021-09-24 22:30:21 +08:00
parent 37ebd30a4d
commit 40a893a8c9

View File

@@ -286,8 +286,6 @@ class EntryActivity : DatabaseLockActivity() {
// Keep the screen on
if (PreferencesUtil.isKeepScreenOnEnabled(this)) {
window.addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
} else {
window.clearFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
}