summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-08-11 22:50:24 +0200
committerTao Bao <tbao@google.com>2017-08-11 22:53:58 +0200
commiteea3af3f911d36ac1a82a9fb95d24912cc07e3b1 (patch)
treeab72b478fbfe1b123f48cf06fb1c2096c02412d8 /wear_ui.cpp
parentAllow customizing WearRecoveryUI via Makefile variables. (diff)
downloadandroid_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar.gz
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar.bz2
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar.lz
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar.xz
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.tar.zst
android_bootable_recovery-eea3af3f911d36ac1a82a9fb95d24912cc07e3b1.zip
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index b8801a0b3..169ef20e1 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -51,8 +51,9 @@ static double now() {
}
WearRecoveryUI::WearRecoveryUI()
- : kProgressBarBaseline(RECOVERY_UI_PROGRESS_BAR_BASELINE), menu_unusable_rows(9) {
- // TODO: menu_unusable_rows should be computed based on the lines in draw_screen_locked().
+ : kProgressBarBaseline(RECOVERY_UI_PROGRESS_BAR_BASELINE),
+ kMenuUnusableRows(RECOVERY_UI_MENU_UNUSABLE_ROWS) {
+ // TODO: kMenuUnusableRows should be computed based on the lines in draw_screen_locked().
// TODO: The following three variables are likely not needed. The first two are detected
// automatically in ScreenRecoveryUI::LoadAnimation(), based on the actual files seen on device.
@@ -268,7 +269,7 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it
show_menu = true;
menu_sel = initial_selection;
menu_start = 0;
- menu_end = visible_text_rows - 1 - menu_unusable_rows;
+ menu_end = visible_text_rows - 1 - kMenuUnusableRows;
if (menu_items <= menu_end) menu_end = menu_items;
update_screen_locked();
}