remove DefaultDevice's UI subclass

RecoveryUI (which is the superclass of ScreenRecoveryUI), provides a
basic CheckKey method that is useful for devices that have KEY_POWER,
KEY_VOLUMEUP, and KEY_VOLUMEDOWN.  Stop overriding it with a less
featureful method; with this no recovery UI customization is needed
for most handheld devices (phones, tablets, etc.).

Change-Id: I7d57cfaaef79afea8af4fc3dbc570afc61aeb5bc
This commit is contained in:
Doug Zongker
2014-04-01 09:47:36 -07:00
parent 276f37e4d4
commit 02abde5085
2 changed files with 3 additions and 12 deletions
+2 -11
View File
@@ -31,20 +31,10 @@ static const char* ITEMS[] = {"reboot system now",
"wipe cache partition",
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 +51,7 @@ class DefaultDevice : public Device {
return kHighlightUp;
case KEY_ENTER:
case KEY_POWER:
return kInvokeItem;
}
}