summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-03-16 10:34:30 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-26 14:35:33 -0700
commit87666b349e039b94eb3d0a77c1262424beff2bf4 (patch)
tree5128cd0ca6d93b9cbbe178b9a26752364c27d506
parent2b8ea31e67df90c708a63291748bc96b452f0e8b (diff)
downloadvboot-87666b349e039b94eb3d0a77c1262424beff2bf4.tar.gz
detachables: Reset timer every time user moves the cursor
In dev mode, after 30 seconds of inactivity, we'll get the usual loud beep and automatic boot from disk. BUG=b:35585623 BRANCH=None TEST=reboot and make sure that fw screen timeout only occurs after 30 seconds of inactivity. Change-Id: Id6552f7213a52ed8c0f083a8388719a8fe79fa77 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/457841 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--firmware/lib/vboot_ui_menu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 77f27468..1ef4b8ae 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -740,6 +740,8 @@ 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);
+ /* reset 30 second timer */
+ audio = VbAudioOpen(cparams);
break;
case VB_BUTTON_VOL_DOWN:
case VB_KEY_DOWN:
@@ -749,6 +751,8 @@ 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);
+ /* reset 30 second timer */
+ audio = VbAudioOpen(cparams);
break;
case VB_BUTTON_POWER:
case '\r':
@@ -851,6 +855,8 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
VbExSleepMs(5000);
return VBERROR_REBOOT_REQUIRED;
}
+ /* reset 30 second timer */
+ audio = VbAudioOpen(cparams);
break;
default:
VB2_DEBUG("pressed key %d\n", key);