diff options
author | Doug Zongker <dougz@android.com> | 2011-01-25 22:53:52 +0100 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-01-25 22:53:52 +0100 |
commit | 5df22d03d2e7c6de213d83a58e0af39c42f839ca (patch) | |
tree | cd3660191919f8429969c20373b761146d9c36c0 /recovery.c | |
parent | am 8d58c957: Merge "Free allocated struct after freeing field" (diff) | |
parent | make recovery reboot after 2 minutes of no activity (diff) | |
download | android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar.gz android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar.bz2 android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar.lz android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar.xz android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.tar.zst android_bootable_recovery-5df22d03d2e7c6de213d83a58e0af39c42f839ca.zip |
Diffstat (limited to 'recovery.c')
-rw-r--r-- | recovery.c | 10 |
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) { |