use the default recovery UI

The key handling we use for deb is now the recovery default; we no
longer need a subclass of ScreenRecoveryUI.

Change-Id: I6ce2a48c66f3360a32c3aa8ba92f30d40c2bbe3f
This commit is contained in:
Doug Zongker 2013-09-04 15:10:37 -07:00
parent ab3f53f809
commit a0503cd905

View file

@ -34,37 +34,11 @@ const char* ITEMS[] = { "reboot system now",
"wipe cache partition",
NULL };
class DebUI : public ScreenRecoveryUI
{
public:
DebUI() :
consecutive_power_keys(0) {
}
virtual KeyAction CheckKey(int key) {
if (IsKeyPressed(KEY_POWER) && key == KEY_VOLUMEUP) {
return TOGGLE;
}
if (key == KEY_POWER) {
++consecutive_power_keys;
if (consecutive_power_keys >= 7) {
return REBOOT;
}
} else {
consecutive_power_keys = 0;
}
return ENQUEUE;
}
private:
int consecutive_power_keys;
};
class DebDevice : public Device
{
public:
DebDevice() :
ui(new DebUI) {
ui(new ScreenRecoveryUI) {
}
RecoveryUI* GetUI() { return ui; }