diff options
author | Shelley Chen <shchen@chromium.org> | 2017-06-22 08:19:04 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-22 17:03:50 -0700 |
commit | 7bd4c0375bbc39d9d2bedeb3aa4c9b2c4c1a8575 (patch) | |
tree | 7a3704c2b490261b0a55260fea7428be0ca51f37 | |
parent | 05418ff02ce0869e13105a4d33545169abeaa2ec (diff) | |
download | vboot-7bd4c0375bbc39d9d2bedeb3aa4c9b2c4c1a8575.tar.gz |
detachables: Fix language menu size in recovery
BUG=b:35585623
BRANCH=None
TEST=Reboot into recovery, scroll to language menu
and make sure that you can scroll and select
other languages.
Change-Id: I6fe7f0550b05e33eaeef928cd23932f5a40fe9ad
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/544897
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | firmware/lib/vboot_ui_menu.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c index a481c035..deab020f 100644 --- a/firmware/lib/vboot_ui_menu.c +++ b/firmware/lib/vboot_ui_menu.c @@ -447,7 +447,6 @@ VbError_t vb2_update_menu(struct vb2_context *ctx) break; case VB_WARN_LANGUAGE: /* Languages */ - // TODO: we'll have to figure out how to display this vb2_set_menu_items(VB_MENU_LANGUAGES, loc); break; @@ -769,7 +768,7 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams) break; case VB_BUTTON_VOL_DOWN: case VB_KEY_DOWN: - /* Do no wrap selection index */ + /* Do not wrap selection index */ if (current_menu == VB_MENU_LANGUAGES) { VbGetLocalizationCount(cparams, &menu_size); } @@ -1041,8 +1040,14 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams) break; case VB_BUTTON_VOL_DOWN: case VB_KEY_DOWN: - vb2_get_current_menu_size(current_menu, NULL, - &menu_size); + /* Do not wrap selection index */ + if (current_menu == VB_MENU_LANGUAGES) { + VbGetLocalizationCount(cparams, &menu_size); + } + else { + vb2_get_current_menu_size(current_menu, + NULL, &menu_size); + } if (current_menu_idx < menu_size-1) current_menu_idx++; vb2_draw_current_screen(ctx, cparams); |