diff options
author | fredchiou <fredchiou@google.com> | 2022-02-11 09:39:53 +0100 |
---|---|---|
committer | Fred Chiou <fredchiou@google.com> | 2022-08-29 15:16:29 +0200 |
commit | b44702a80ae8efcb3090aa6a4331ec3d93e04f10 (patch) | |
tree | f6418cc64f5dc79db3c8b1bb715fdc020b8fe30b /recovery_ui/include | |
parent | Merge "Update static libs deps in recovery" (diff) | |
download | android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar.gz android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar.bz2 android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar.lz android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar.xz android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.tar.zst android_bootable_recovery-b44702a80ae8efcb3090aa6a4331ec3d93e04f10.zip |
Diffstat (limited to 'recovery_ui/include')
-rw-r--r-- | recovery_ui/include/recovery_ui/screen_ui.h | 6 | ||||
-rw-r--r-- | recovery_ui/include/recovery_ui/stub_ui.h | 4 | ||||
-rw-r--r-- | recovery_ui/include/recovery_ui/ui.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/recovery_ui/include/recovery_ui/screen_ui.h b/recovery_ui/include/recovery_ui/screen_ui.h index 92b3c2546..99ad53420 100644 --- a/recovery_ui/include/recovery_ui/screen_ui.h +++ b/recovery_ui/include/recovery_ui/screen_ui.h @@ -245,6 +245,9 @@ class ScreenRecoveryUI : public RecoveryUI, public DrawInterface { const std::vector<std::string>& backup_headers, const std::vector<std::string>& backup_items, const std::function<int(int, bool)>& key_handler) override; + // For Lid switch handle + int SetSwCallback(int code, int value) override; + protected: static constexpr int kMenuIndent = 4; @@ -404,6 +407,9 @@ class ScreenRecoveryUI : public RecoveryUI, public DrawInterface { std::mutex updateMutex; + // Switch the display to active one after graphics is ready + bool is_graphics_available; + private: void SetLocale(const std::string&); diff --git a/recovery_ui/include/recovery_ui/stub_ui.h b/recovery_ui/include/recovery_ui/stub_ui.h index 511b1314a..49689ba36 100644 --- a/recovery_ui/include/recovery_ui/stub_ui.h +++ b/recovery_ui/include/recovery_ui/stub_ui.h @@ -80,6 +80,10 @@ class StubRecoveryUI : public RecoveryUI { } void SetTitle(const std::vector<std::string>& /* lines */) override {} + + int SetSwCallback(int /* code */, int /* value */) override { + return 0; + } }; #endif // RECOVERY_STUB_UI_H diff --git a/recovery_ui/include/recovery_ui/ui.h b/recovery_ui/include/recovery_ui/ui.h index 512732f90..c3e3ee26c 100644 --- a/recovery_ui/include/recovery_ui/ui.h +++ b/recovery_ui/include/recovery_ui/ui.h @@ -231,6 +231,8 @@ class RecoveryUI { bool InitScreensaver(); void SetScreensaverState(ScreensaverState state); + virtual int SetSwCallback(int code, int value) = 0; + // Key event input queue std::mutex key_queue_mutex; std::condition_variable key_queue_cond; |