summaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-01-25 22:56:07 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2011-01-25 22:56:07 +0100
commit6da1abbc387d51eb795628fb690d333f10f28408 (patch)
tree7d0ac3959a644d36d40a907776ffa6fe8653acaf /recovery.c
parentam da993fcf: am 8d58c957: Merge "Free allocated struct after freeing field" (diff)
parentam 5cae445e: make recovery reboot after 2 minutes of no activity (diff)
downloadandroid_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar.gz
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar.bz2
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar.lz
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar.xz
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.tar.zst
android_bootable_recovery-6da1abbc387d51eb795628fb690d333f10f28408.zip
Diffstat (limited to 'recovery.c')
-rw-r--r--recovery.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/recovery.c b/recovery.c
index aebfba4f8..671cfbebd 100644
--- a/recovery.c
+++ b/recovery.c
@@ -424,6 +424,16 @@ get_menu_selection(char** headers, char** items, int menu_only,
int key = ui_wait_key();
int visible = ui_text_visible();
+ if (key == -1) { // ui_wait_key() timed out
+ if (ui_text_ever_visible()) {
+ continue;
+ } else {
+ LOGI("timed out waiting for key input; rebooting.\n");
+ ui_end_menu();
+ return ITEM_REBOOT;
+ }
+ }
+
int action = device_handle_key(key, visible);
if (action < 0) {