From e5032219fe909864233e8225ee4fabd10c49ed5b Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Tue, 23 Jul 2019 13:23:29 -0700 Subject: Create a new function to return the help message for menu Then we can override this function in the device specific recovery ui; and allow customizing the help message. Bug: 137965958 Test: Check the menu on sailfish Change-Id: I09f23166f4205c5edf6c62eb42c8ada0fa710b26 --- recovery_ui/include/recovery_ui/screen_ui.h | 3 +++ recovery_ui/include/recovery_ui/ui.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'recovery_ui/include') diff --git a/recovery_ui/include/recovery_ui/screen_ui.h b/recovery_ui/include/recovery_ui/screen_ui.h index 5cda2a2e5..92b3c2546 100644 --- a/recovery_ui/include/recovery_ui/screen_ui.h +++ b/recovery_ui/include/recovery_ui/screen_ui.h @@ -286,6 +286,9 @@ class ScreenRecoveryUI : public RecoveryUI, public DrawInterface { // selected. virtual int SelectMenu(int sel); + // Returns the help message displayed on top of the menu. + virtual std::vector GetMenuHelpMessage() const; + virtual void draw_background_locked(); virtual void draw_foreground_locked(); virtual void draw_screen_locked(); diff --git a/recovery_ui/include/recovery_ui/ui.h b/recovery_ui/include/recovery_ui/ui.h index a95f935e4..08ec1d76a 100644 --- a/recovery_ui/include/recovery_ui/ui.h +++ b/recovery_ui/include/recovery_ui/ui.h @@ -118,7 +118,7 @@ class RecoveryUI { // Returns true if you have the volume up/down and power trio typical of phones and tablets, false // otherwise. - virtual bool HasThreeButtons(); + virtual bool HasThreeButtons() const; // Returns true if it has a power key. virtual bool HasPowerKey() const; -- cgit v1.2.3