summaryrefslogtreecommitdiffstats
path: root/default_device.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-06 15:35:10 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-11-06 15:35:13 +0100
commita167416289a8aef5d4c35861c9f4181f87b8bfd0 (patch)
treecfb0b940141a4273ac6ddb58070e36ea706b7358 /default_device.cpp
parent2.8.2.0 (diff)
parentUse more aggressive sync writing to applypatch. (diff)
downloadandroid_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.gz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.bz2
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.lz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.xz
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.tar.zst
android_bootable_recovery-a167416289a8aef5d4c35861c9f4181f87b8bfd0.zip
Diffstat (limited to 'default_device.cpp')
-rw-r--r--default_device.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/default_device.cpp b/default_device.cpp
index 648eaec4e..97806ac58 100644
--- a/default_device.cpp
+++ b/default_device.cpp
@@ -29,22 +29,15 @@ static const char* ITEMS[] = {"reboot system now",
"apply update from ADB",
"wipe data/factory reset",
"wipe cache partition",
+ "reboot to bootloader",
+ "power down",
+ "view recovery logs",
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 +54,7 @@ class DefaultDevice : public Device {
return kHighlightUp;
case KEY_ENTER:
+ case KEY_POWER:
return kInvokeItem;
}
}
@@ -74,6 +68,9 @@ 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;
+ case 6: return READ_RECOVERY_LASTLOG;
default: return NO_ACTION;
}
}