diff options
author | Doug Zongker <dougz@android.com> | 2014-04-01 18:45:24 +0200 |
---|---|---|
committer | Doug Zongker <dougz@android.com> | 2014-04-01 18:47:36 +0200 |
commit | 02abde50851f66196c74d215150014f1378cb853 (patch) | |
tree | 53eaf66676eaad28448e105525505a8478ddf9e1 | |
parent | Merge "Fix build break caused by vold change" (diff) | |
download | android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.gz android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.bz2 android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.lz android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.xz android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.tar.zst android_bootable_recovery-02abde50851f66196c74d215150014f1378cb853.zip |
Diffstat (limited to '')
-rw-r--r-- | default_device.cpp | 13 | ||||
-rw-r--r-- | ui.cpp | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/default_device.cpp b/default_device.cpp index 648eaec4e..1f181318e 100644 --- a/default_device.cpp +++ b/default_device.cpp @@ -31,20 +31,10 @@ static const char* ITEMS[] = {"reboot system now", "wipe cache partition", NULL }; -class DefaultUI : public ScreenRecoveryUI { - public: - virtual KeyAction CheckKey(int key) { - if (key == KEY_HOME) { - return TOGGLE; - } - return ENQUEUE; - } -}; - class DefaultDevice : public Device { public: DefaultDevice() : - ui(new DefaultUI) { + ui(new ScreenRecoveryUI) { } RecoveryUI* GetUI() { return ui; } @@ -61,6 +51,7 @@ class DefaultDevice : public Device { return kHighlightUp; case KEY_ENTER: + case KEY_POWER: return kInvokeItem; } } @@ -276,7 +276,7 @@ void RecoveryUI::FlushKeys() { // - Press power seven times in a row to reboot. // - Alternate vol-up and vol-down seven times to mount /system. RecoveryUI::KeyAction RecoveryUI::CheckKey(int key) { - if (IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) { + if ((IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) || key == KEY_HOME) { return TOGGLE; } |