aboutsummaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-13 10:47:59 -0700
committerElliott Hughes <enh@google.com>2015-04-13 10:47:59 -0700
commit300ed089b3c5717ddf46eb3a25d94c8d017e7be2 (patch)
treeb8e7f4549a7fb6d562a1e01eac35e1080031db0e /screen_ui.cpp
parent0e3781ef9af2df648f54eb2a7765bef7b6b5b22e (diff)
downloadbootable_recovery-300ed089b3c5717ddf46eb3a25d94c8d017e7be2.tar.gz
bootable_recovery-300ed089b3c5717ddf46eb3a25d94c8d017e7be2.tar.bz2
bootable_recovery-300ed089b3c5717ddf46eb3a25d94c8d017e7be2.zip
Treat KEY_ENTER the same as KEY_POWER in the pager.
Our long-press UI sends KEY_ENTER for long presses, which the long-press UI treats as equivalent to KEY_POWER in the regular UI. So anywhere we accept KEY_POWER we should accept KEY_ENTER too. Change-Id: I99d376c961887043cf02037c26d000c8ba4d66f9
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 1e42ee7..cca261f 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -539,7 +539,7 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) {
while (show_prompt) {
show_prompt = false;
int key = WaitKey();
- if (key == KEY_POWER) {
+ if (key == KEY_POWER || key == KEY_ENTER) {
return;
} else if (key == KEY_UP || key == KEY_VOLUMEUP) {
if (offsets.size() <= 1) {