aboutsummaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 12:47:46 -0700
committerElliott Hughes <enh@google.com>2015-04-10 12:47:46 -0700
commit642aaa7a3e11b2de719fc9decc45174bcc235c0c (patch)
tree7e8d33676678e2240d5368fca8465712b24285cd /recovery.cpp
parent6b0dd1d7e1e1f3645230f880db95cad1279a826b (diff)
downloadbootable_recovery-642aaa7a3e11b2de719fc9decc45174bcc235c0c.zip
bootable_recovery-642aaa7a3e11b2de719fc9decc45174bcc235c0c.tar.gz
bootable_recovery-642aaa7a3e11b2de719fc9decc45174bcc235c0c.tar.bz2
Fix ScreenRecoveryUI to handle devices without power/up/down.
Currently fugu has a custom subclass to handle this. The default code supports devices with trackballs but not all shipping Nexus devices? That's just silly. Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/recovery.cpp b/recovery.cpp
index cdbb598..43a42ea 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -545,12 +545,10 @@ get_menu_selection(const char* const * headers, const char* const * items,
if (action < 0) {
switch (action) {
case Device::kHighlightUp:
- --selected;
- selected = ui->SelectMenu(selected);
+ selected = ui->SelectMenu(--selected);
break;
case Device::kHighlightDown:
- ++selected;
- selected = ui->SelectMenu(selected);
+ selected = ui->SelectMenu(++selected);
break;
case Device::kInvokeItem:
chosen_item = selected;