summaryrefslogtreecommitdiffstats
path: root/recovery.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2011-01-25 22:15:30 +0100
committerDoug Zongker <dougz@android.com>2011-01-25 22:50:16 +0100
commit5cae445e43c5928daba0a76745b0dd2657274eda (patch)
tree2afc1e07d1dbd6e677af74419b31c321641b33aa /recovery.c
parentReserve the last 16 Kbytes of /data for the crypto footer. (diff)
downloadandroid_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar.gz
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar.bz2
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar.lz
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar.xz
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.tar.zst
android_bootable_recovery-5cae445e43c5928daba0a76745b0dd2657274eda.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 9ad075d74..c81a13c37 100644
--- a/recovery.c
+++ b/recovery.c
@@ -446,6 +446,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) {