summaryrefslogtreecommitdiffstats
path: root/gui/blanktimer.cpp
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2013-07-01 22:34:53 +0200
committerGerrit Code Review <gerrit@5.9.244.119>2013-07-01 22:34:53 +0200
commitc322a1bc501ae6c37db1231ac48071b616c95354 (patch)
tree26a029a04c28ff05a8e3b1d5a1f343f93a29119c /gui/blanktimer.cpp
parentMerge "verifier_test : fix the call to verify_file" into twrp2.5 (diff)
parentDo not render the GUI when the blanktimer turns off the display. (diff)
downloadandroid_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar.gz
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar.bz2
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar.lz
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar.xz
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.tar.zst
android_bootable_recovery-c322a1bc501ae6c37db1231ac48071b616c95354.zip
Diffstat (limited to 'gui/blanktimer.cpp')
-rw-r--r--gui/blanktimer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
index 700a9ad27..0b1f0083c 100644
--- a/gui/blanktimer.cpp
+++ b/gui/blanktimer.cpp
@@ -48,6 +48,11 @@ blanktimer::blanktimer(void) {
setTime(0);
setConBlank(0);
orig_brightness = getBrightness();
+ screenoff = false;
+}
+
+bool blanktimer::IsScreenOff() {
+ return screenoff;
}
void blanktimer::setTime(int newtime) {
@@ -92,6 +97,7 @@ int blanktimer::setClockTimer(void) {
if (sleepTimer && diff.tv_sec > sleepTimer && conblank < 2) {
setConBlank(2);
setBrightness(0);
+ screenoff = true;
PageManager::ChangeOverlay("lock");
}
#ifndef TW_NO_SCREEN_BLANK
@@ -146,6 +152,7 @@ void blanktimer::resetTimerAndUnblank(void) {
// No break here, we want to keep going
case 2:
gui_forceRender();
+ screenoff = false;
// No break here, we want to keep going
case 1:
setBrightness(orig_brightness);