diff options
-rw-r--r-- | firmware/2lib/2ui.c | 20 | ||||
-rw-r--r-- | firmware/2lib/include/2ui_private.h | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/firmware/2lib/2ui.c b/firmware/2lib/2ui.c index ee0da1f1..96a7b939 100644 --- a/firmware/2lib/2ui.c +++ b/firmware/2lib/2ui.c @@ -15,6 +15,7 @@ #include "2ui_private.h" #include "vboot_api.h" /* For VB_SHUTDOWN_REQUEST_POWER_BUTTON */ #include "vboot_kernel.h" +#include "vboot_ui_legacy.h" /* TODO(b/144969088): VbDisplayDebugInfo */ #define KEY_DELAY_MS 20 /* Delay between key scans in UI loops */ @@ -324,6 +325,10 @@ vb2_error_t developer_action(struct vb2_ui_context *ui) (DETACHABLE && ui->key == VB_BUTTON_VOL_DOWN_LONG_PRESS)) return vb2_ui_developer_mode_boot_internal_action(ui); + /* TODO(b/144969088): Re-implement as debug info screen. */ + if (ui->key == '\t') + VbDisplayDebugInfo(ui->ctx); + return VB2_REQUEST_UI_CONTINUE; } @@ -332,7 +337,16 @@ vb2_error_t developer_action(struct vb2_ui_context *ui) vb2_error_t vb2_broken_recovery_menu(struct vb2_context *ctx) { - return ui_loop(ctx, VB2_SCREEN_RECOVERY_BROKEN, NULL); + return ui_loop(ctx, VB2_SCREEN_RECOVERY_BROKEN, broken_recovery_action); +} + +vb2_error_t broken_recovery_action(struct vb2_ui_context *ui) +{ + /* TODO(b/144969088): Re-implement as debug info screen. */ + if (ui->key == '\t') + VbDisplayDebugInfo(ui->ctx); + + return VB2_REQUEST_UI_CONTINUE; } /*****************************************************************************/ @@ -366,5 +380,9 @@ vb2_error_t manual_recovery_action(struct vb2_ui_context *ui) (DETACHABLE && ui->key == VB_BUTTON_VOL_UP_DOWN_COMBO_PRESS)) return vb2_ui_change_screen(ui, VB2_SCREEN_RECOVERY_TO_DEV); + /* TODO(b/144969088): Re-implement as debug info screen. */ + if (ui->key == '\t') + VbDisplayDebugInfo(ui->ctx); + return VB2_REQUEST_UI_CONTINUE; } diff --git a/firmware/2lib/include/2ui_private.h b/firmware/2lib/include/2ui_private.h index e1e47af3..effa280d 100644 --- a/firmware/2lib/include/2ui_private.h +++ b/firmware/2lib/include/2ui_private.h @@ -17,6 +17,7 @@ vb2_error_t menu_navigation_action(struct vb2_ui_context *ui); vb2_error_t ui_loop(struct vb2_context *ctx, enum vb2_screen root_screen_id, vb2_error_t (*global_action)(struct vb2_ui_context *ui)); vb2_error_t developer_action(struct vb2_ui_context *ui); +vb2_error_t broken_recovery_action(struct vb2_ui_context *ui); vb2_error_t manual_recovery_action(struct vb2_ui_context *ui); /* From 2ui_screens.c */ |