Auto-detect whether to use the long-press UI.
Change-Id: Ie77a5584e301467c6a5e164d2c62d6f036b2c0c0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user