From 3aec6965bff19ae34ea036c5416c9106c1bd9340 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 20 Apr 2018 09:24:58 -0700 Subject: Add ScreenRecoveryUI::ShowMenu(). From caller's PoV, RecoveryUI::{Start,Select,End}Menu should always be used together, i.e. to show a menu and get user's selection. This CL provides ShowMenu() as one-stop service (which is based on get_menu_selection() from recovery.cpp). Also move RecoveryUI::{Start,Select,End}Menu into ScreenRecoveryUI, with a dropped access level from public to protected. Due to the dependency on recovery / librecovery refactoring, will add testcases in follow-up CLs. Test: Build and boot into recovery image. Check the menus (main menu, 'View recovery logs', 'Wipe data/factory reset'). Change-Id: Ie17aa78144871a12affd6f9075e045f76608a0ba --- wear_ui.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wear_ui.h') diff --git a/wear_ui.h b/wear_ui.h index 8b24cb73e..fcbbee289 100644 --- a/wear_ui.h +++ b/wear_ui.h @@ -25,9 +25,6 @@ class WearRecoveryUI : public ScreenRecoveryUI { void SetStage(int current, int max) override; - void StartMenu(const char* const* headers, const char* const* items, - int initial_selection) override; - protected: // progress bar vertical position, it's centered horizontally const int kProgressBarBaseline; @@ -36,6 +33,9 @@ class WearRecoveryUI : public ScreenRecoveryUI { // Recovery, build id and etc) and the bottom lines that may otherwise go out of the screen. const int kMenuUnusableRows; + void StartMenu(const char* const* headers, const char* const* items, + int initial_selection) override; + int GetProgressBaseline() const override; void update_progress_locked() override; -- cgit v1.2.3