mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-15 20:37:33 +00:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user