use the default recovery UI
The key handling we use for hammerhead is now the recovery default; we
no longer need a subclass of ScreenRecoveryUI.
Change-Id: Ibe0236d4046e99c36f6d21b8621a071bfc758e1c
diff --git a/recovery/recovery_ui.cpp b/recovery/recovery_ui.cpp
index 4ef282d..98bb24f 100644
--- a/recovery/recovery_ui.cpp
+++ b/recovery/recovery_ui.cpp
@@ -34,37 +34,11 @@
"wipe cache partition",
NULL };
-class HammerheadUI : public ScreenRecoveryUI
-{
-public:
- HammerheadUI() :
- 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 HammerheadDevice : public Device
{
public:
HammerheadDevice() :
- ui(new HammerheadUI) {
+ ui(new ScreenRecoveryUI) {
}
RecoveryUI* GetUI() { return ui; }