summaryrefslogtreecommitdiffstats
path: root/default_device.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-11 00:28:56 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-11 00:28:57 +0200
commitf19007a5252d62020c3ac8796908d9ee4653830d (patch)
treef327758d07cdb58a8e4a06f236f82f8df9515992 /default_device.cpp
parentMerge "Switch minadb over to C++." (diff)
parentAuto-detect whether to use the long-press UI. (diff)
downloadandroid_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar.gz
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar.bz2
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar.lz
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar.xz
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.tar.zst
android_bootable_recovery-f19007a5252d62020c3ac8796908d9ee4653830d.zip
Diffstat (limited to 'default_device.cpp')
-rw-r--r--default_device.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/default_device.cpp b/default_device.cpp
index d7dd45283..a9718668d 100644
--- a/default_device.cpp
+++ b/default_device.cpp
@@ -17,33 +17,6 @@
#include "device.h"
#include "screen_ui.h"
-class DefaultDevice : public Device {
- public:
- DefaultDevice() : Device(new ScreenRecoveryUI) {
- }
-
- // TODO: make this handle more cases, and move the default implementation into Device too.
- int HandleMenuKey(int key, int visible) {
- if (visible) {
- switch (key) {
- case KEY_DOWN:
- case KEY_VOLUMEDOWN:
- return kHighlightDown;
-
- case KEY_UP:
- case KEY_VOLUMEUP:
- return kHighlightUp;
-
- case KEY_ENTER:
- case KEY_POWER:
- return kInvokeItem;
- }
- }
-
- return kNoAction;
- }
-};
-
Device* make_device() {
- return new DefaultDevice;
+ return new Device(new ScreenRecoveryUI);
}