diff options
author | Tao Bao <tbao@google.com> | 2017-01-31 07:11:36 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-01-31 07:11:37 +0100 |
commit | 389a29193c2cdd7dae62d712ca609ffc98e7081a (patch) | |
tree | d6ea708f810fc06bc0c33d8386b3d01f035c25a5 /ui.h | |
parent | Merge "Remove '_static' suffix from libext2* references." (diff) | |
parent | recovery: Add screensaver mode. (diff) | |
download | android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar.gz android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar.bz2 android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar.lz android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar.xz android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.tar.zst android_bootable_recovery-389a29193c2cdd7dae62d712ca609ffc98e7081a.zip |
Diffstat (limited to '')
-rw-r--r-- | ui.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |