summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-03-09 13:52:16 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-05-26 14:35:32 -0700
commit2b8ea31e67df90c708a63291748bc96b452f0e8b (patch)
treee4de3580b385b7453f83a4785d22ba28105f68e4
parent2ed9ca605c7ad48b4a2821c5d90c0b569a0afbfe (diff)
downloadvboot-2b8ea31e67df90c708a63291748bc96b452f0e8b.tar.gz
detachables: Use locale bitmaps instead of text
BUG=b:35585623 BRANCH=None TEST=reboot and make sure that the bitmaps show up Change-Id: I92a9cf7dc808a22c7ace25763d4ef49824a93054 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457840
-rw-r--r--firmware/lib/vboot_ui_menu.c62
1 files changed, 25 insertions, 37 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 453ef573..77f27468 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -647,7 +647,8 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
/* If dev mode is disabled, only allow TONORM */
while (disable_dev_boot) {
VB2_DEBUG("dev_disable_boot is set.\n");
- VbDisplayScreen(ctx, cparams, VB_SCREEN_DEVELOPER_TO_NORM, 0);
+ VbDisplayScreen(ctx, cparams, VB_SCREEN_DEVELOPER_TO_NORM_MENU,
+ 0);
VbExDisplayDebugInfo(dev_disable_msg);
/* Ignore space in VbUserConfirmsMenu()... */
@@ -670,9 +671,7 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
}
/* Show the dev mode warning screen */
- //TODO: change this to blank screen?
- VbDisplayScreen(ctx, cparams, VB_SCREEN_BASE, 0);
- vb2_print_current_menu();
+ vb2_draw_current_screen(ctx, cparams);
/* Get audio/delay context */
audio = VbAudioOpen(cparams);
@@ -729,11 +728,7 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
return VBERROR_SUCCESS;
} else {
/* Show dev mode warning screen again */
- VbDisplayScreen(ctx,
- cparams,
- VB_SCREEN_BASE,
- 0);
- vb2_print_current_menu();
+ vb2_draw_current_screen(ctx, cparams);
}
}
break;
@@ -745,7 +740,6 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
if (current_menu_idx > 0)
current_menu_idx--;
vb2_draw_current_screen(ctx, cparams);
- vb2_print_current_menu();
break;
case VB_BUTTON_VOL_DOWN:
case VB_KEY_DOWN:
@@ -755,7 +749,6 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
if (current_menu_idx < menu_size-1)
current_menu_idx++;
vb2_draw_current_screen(ctx, cparams);
- vb2_print_current_menu();
break;
case VB_BUTTON_POWER:
case '\r':
@@ -767,9 +760,7 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
* artifacts from previous menu printing.
*/
VbDisplayScreen(ctx, cparams, VB_SCREEN_BLANK, 0);
- VbDisplayScreen(ctx, cparams,
- VB_SCREEN_BASE, 0);
- vb2_print_current_menu();
+ vb2_draw_current_screen(ctx, cparams);
/* Probably shutting down */
if (ret != VBERROR_SUCCESS) {
@@ -822,17 +813,13 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
VbTryUsbMenu(ctx, cparams)) {
VbAudioClose(audio);
return VBERROR_SUCCESS;
- } else {
+ } else
/*
* Show dev mode warning screen
* again
*/
- VbDisplayScreen(ctx,
- cparams,
- VB_SCREEN_BASE,
- 0);
- vb2_print_current_menu();
- }
+ vb2_draw_current_screen(ctx,
+ cparams);
}
}
@@ -985,12 +972,12 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
if (current_menu != VB_MENU_RECOVERY ||
current_menu_idx != VB_RECOVERY_DBG_INFO) {
- VbDisplayScreen(ctx, cparams,
- VBERROR_NO_DISK_FOUND == retval ?
- VB_SCREEN_BASE :
- VB_SCREEN_RECOVERY_NO_GOOD,
- 0);
- vb2_print_current_menu();
+ if (retval == VBERROR_NO_DISK_FOUND)
+ vb2_draw_current_screen(ctx, cparams);
+ else
+ VbDisplayScreen(ctx, cparams,
+ VB_SCREEN_RECOVERY_NO_GOOD,
+ 0);
}
/*
@@ -1005,19 +992,19 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
break;
case VB_BUTTON_VOL_UP:
case VB_KEY_UP:
- vb2_get_current_menu_size(current_menu, NULL, &menu_size);
+ vb2_get_current_menu_size(current_menu, NULL,
+ &menu_size);
if (current_menu_idx > 0)
current_menu_idx--;
vb2_draw_current_screen(ctx, cparams);
- vb2_print_current_menu();
break;
case VB_BUTTON_VOL_DOWN:
case VB_KEY_DOWN:
- vb2_get_current_menu_size(current_menu, NULL, &menu_size);
+ 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);
- vb2_print_current_menu();
break;
case VB_BUTTON_POWER:
case '\r':
@@ -1031,12 +1018,13 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
* blanking to clear previous menus
* printed.
*/
- VbDisplayScreen(ctx, cparams, VB_SCREEN_BLANK, 0);
- VbDisplayScreen(ctx, cparams, VBERROR_NO_DISK_FOUND == retval ?
- VB_SCREEN_BASE :
- VB_SCREEN_RECOVERY_NO_GOOD,
- 0);
- vb2_print_current_menu();
+ if (retval == VBERROR_NO_DISK_FOUND)
+ vb2_draw_current_screen(ctx,
+ cparams);
+ else
+ VbDisplayScreen(ctx, cparams,
+ VB_SCREEN_RECOVERY_NO_GOOD,
+ 0);
}
/* Probably shutting down */