summaryrefslogtreecommitdiffstats
path: root/ui.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-01-31 07:22:54 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-31 07:22:54 +0100
commit85ff6f7d06e27e50ba5a3f05175aaf69163e3d60 (patch)
treed372171786eecca83c695f2c53b710e197a51ab7 /ui.h
parentMerge "Remove '_static' suffix from libext2* references." am: 56ff8061b1 am: 5b5b8333e0 am: 9518d34c0f (diff)
parentMerge "recovery: Add screensaver mode." am: 389a29193c am: 2684259c34 (diff)
downloadandroid_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar.gz
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar.bz2
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar.lz
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar.xz
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.tar.zst
android_bootable_recovery-85ff6f7d06e27e50ba5a3f05175aaf69163e3d60.zip
Diffstat (limited to 'ui.h')
-rw-r--r--ui.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui.h b/ui.h
index 53ce0602f..823eb6574 100644
--- a/ui.h
+++ b/ui.h
@@ -130,6 +130,13 @@ class RecoveryUI {
std::string locale_;
bool rtl_locale_;
+ // The normal and dimmed brightness percentages (default: 50 and 25, which means 50% and 25%
+ // of the max_brightness). Because the absolute values may vary across devices. These two
+ // values can be configured via subclassing. Setting brightness_normal_ to 0 to disable
+ // screensaver.
+ unsigned int brightness_normal_;
+ unsigned int brightness_dimmed_;
+
private:
// Key event input queue
pthread_mutex_t key_queue_mutex;
@@ -167,6 +174,14 @@ class RecoveryUI {
void time_key(int key_code, int count);
void SetLocale(const std::string&);
+
+ enum class ScreensaverState { DISABLED, NORMAL, DIMMED, OFF };
+ ScreensaverState screensaver_state_;
+ // The following two contain the absolute values computed from brightness_normal_ and
+ // brightness_dimmed_ respectively.
+ unsigned int brightness_normal_value_;
+ unsigned int brightness_dimmed_value_;
+ bool InitScreensaver();
};
#endif // RECOVERY_UI_H