summaryrefslogtreecommitdiffstats
path: root/default_device.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-11 00:36:42 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-11 00:36:42 +0200
commit34bbc7d49a4f0578798d039fc16369b1a6ea16bd (patch)
treef327758d07cdb58a8e4a06f236f82f8df9515992 /default_device.cpp
parentam 51697d27: Merge "Switch minadb over to C++." (diff)
parentMerge "Auto-detect whether to use the long-press UI." (diff)
downloadandroid_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar.gz
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar.bz2
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar.lz
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar.xz
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.tar.zst
android_bootable_recovery-34bbc7d49a4f0578798d039fc16369b1a6ea16bd.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);
}