summaryrefslogtreecommitdiffstats
path: root/gui/blanktimer.cpp
diff options
context:
space:
mode:
authorTatsuyuki Ishi <ishitatsuyuki@gmail.com>2015-12-28 02:08:58 +0100
committerDees Troy <dees_troy@teamw.in>2016-01-22 18:06:00 +0100
commit548a175182238e2612af0892ca5475aba5b02c44 (patch)
treec74cef9d616b97ac610bd2dc3b50dcb6100dc38a /gui/blanktimer.cpp
parentminzip: Add support for >2GB zipfile (diff)
downloadandroid_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar.gz
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar.bz2
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar.lz
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar.xz
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.tar.zst
android_bootable_recovery-548a175182238e2612af0892ca5475aba5b02c44.zip
Diffstat (limited to '')
-rw-r--r--gui/blanktimer.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
index 95b6c47ff..06208e273 100644
--- a/gui/blanktimer.cpp
+++ b/gui/blanktimer.cpp
@@ -81,16 +81,13 @@ void blanktimer::checkForTimeout() {
string blanktimer::getBrightness(void) {
string result;
- string brightness_path;
- DataManager::GetValue("tw_brightness_file", brightness_path);
- if (brightness_path == "/nobrightness")
- return brightness_path;
- DataManager::GetValue("tw_brightness", result);
- if (result == "") {
- result = "255";
+
+ if (DataManager::GetIntValue("tw_has_brightnesss_file")) {
+ DataManager::GetValue("tw_brightness", result);
+ if (result.empty())
+ result = "255";
}
return result;
-
}
void blanktimer::resetTimerAndUnblank(void) {
@@ -112,7 +109,7 @@ void blanktimer::resetTimerAndUnblank(void) {
gui_forceRender();
// No break here, we want to keep going
case kDim:
- if (orig_brightness != "/nobrightness")
+ if (!orig_brightness.empty())
TWFunc::Set_Brightness(orig_brightness);
state = kOn;
case kOn: