diff options
Diffstat (limited to 'default_device.cpp')
-rw-r--r-- | default_device.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/default_device.cpp b/default_device.cpp index 648eaec4e..a25f05f8e 100644 --- a/default_device.cpp +++ b/default_device.cpp @@ -29,22 +29,14 @@ static const char* ITEMS[] = {"reboot system now", "apply update from ADB", "wipe data/factory reset", "wipe cache partition", + "reboot to bootloader", + "power down", 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 +53,7 @@ class DefaultDevice : public Device { return kHighlightUp; case KEY_ENTER: + case KEY_POWER: return kInvokeItem; } } @@ -74,6 +67,8 @@ class DefaultDevice : public Device { case 1: return APPLY_ADB_SIDELOAD; case 2: return WIPE_DATA; case 3: return WIPE_CACHE; + case 4: return REBOOT_BOOTLOADER; + case 5: return SHUTDOWN; default: return NO_ACTION; } } |