mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 21:02:27 +00:00
detachables: create menu items for legacy screens
Previously, we didn't require any action on these legacy screens, so didn't update current_screen when displaying these. Now, will be adding language switching and debug display for these screens, so need to keep track of them. BUG=b:65470853, b:67371896, b:64400036 BRANCH=None TEST=None Change-Id: I2bab22fcbb0bb3cdfffe585eb633231ba8015fc3 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/676269 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -102,6 +102,9 @@ typedef enum _VB_MENU {
|
||||
VB_MENU_TO_DEV,
|
||||
VB_MENU_LANGUAGES,
|
||||
VB_MENU_RECOVERY_INSERT,
|
||||
VB_MENU_RECOVERY_NO_GOOD,
|
||||
VB_MENU_RECOVERY_BROKEN,
|
||||
VB_MENU_TO_NORM_CONFIRMED,
|
||||
VB_MENU_COUNT,
|
||||
} VB_MENU;
|
||||
|
||||
@@ -302,6 +305,9 @@ static const uint32_t VB_MENU_TO_SCREEN_MAP[] = {
|
||||
VB_SCREEN_RECOVERY_TO_DEV_MENU,
|
||||
VB_SCREEN_LANGUAGES_MENU,
|
||||
VB_SCREEN_RECOVERY_INSERT,
|
||||
VB_SCREEN_RECOVERY_NO_GOOD,
|
||||
VB_SCREEN_OS_BROKEN,
|
||||
VB_SCREEN_TO_NORM_CONFIRMED,
|
||||
};
|
||||
|
||||
VbError_t vb2_draw_current_screen(struct vb2_context *ctx,
|
||||
@@ -458,6 +464,10 @@ VbError_t vb2_update_menu(struct vb2_context *ctx)
|
||||
vb2_set_menu_items(VB_MENU_RECOVERY,
|
||||
VB_RECOVERY_POWER_OFF);
|
||||
break;
|
||||
case VB_MENU_RECOVERY_NO_GOOD:
|
||||
case VB_MENU_RECOVERY_BROKEN:
|
||||
case VB_MENU_TO_NORM_CONFIRMED:
|
||||
break;
|
||||
case VB_MENU_RECOVERY:
|
||||
switch(current_menu_idx) {
|
||||
case VB_RECOVERY_TO_DEV:
|
||||
@@ -909,6 +919,7 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
|
||||
cparams,
|
||||
VB_SCREEN_TO_NORM_CONFIRMED,
|
||||
0);
|
||||
current_menu = VB_MENU_TO_NORM_CONFIRMED;
|
||||
VbExSleepMs(5000);
|
||||
return VBERROR_REBOOT_REQUIRED;
|
||||
}
|
||||
@@ -995,6 +1006,7 @@ static VbError_t recovery_ui(struct vb2_context *ctx, VbCommonParams *cparams)
|
||||
vb2_nv_commit(ctx);
|
||||
|
||||
VbDisplayScreen(ctx, cparams, VB_SCREEN_OS_BROKEN, 0);
|
||||
current_menu = VB_MENU_RECOVERY_BROKEN;
|
||||
VB2_DEBUG("waiting for manual recovery\n");
|
||||
while (1) {
|
||||
key = VbExKeyboardRead();
|
||||
@@ -1039,10 +1051,12 @@ static VbError_t recovery_ui(struct vb2_context *ctx, VbCommonParams *cparams)
|
||||
current_menu_idx != VB_RECOVERY_DBG_INFO) {
|
||||
if (retval == VBERROR_NO_DISK_FOUND)
|
||||
vb2_draw_current_screen(ctx, cparams);
|
||||
else
|
||||
else {
|
||||
VbDisplayScreen(ctx, cparams,
|
||||
VB_SCREEN_RECOVERY_NO_GOOD,
|
||||
0);
|
||||
current_menu = VB_MENU_RECOVERY_NO_GOOD;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1124,10 +1138,12 @@ static VbError_t recovery_ui(struct vb2_context *ctx, VbCommonParams *cparams)
|
||||
if (retval == VBERROR_NO_DISK_FOUND)
|
||||
vb2_draw_current_screen(ctx,
|
||||
cparams);
|
||||
else
|
||||
else {
|
||||
VbDisplayScreen(ctx, cparams,
|
||||
VB_SCREEN_RECOVERY_NO_GOOD,
|
||||
0);
|
||||
current_menu = VB_MENU_RECOVERY_NO_GOOD;
|
||||
}
|
||||
}
|
||||
|
||||
/* Probably shutting down */
|
||||
|
||||
Reference in New Issue
Block a user