From 336a9949c47eaead7cbedec118dd15e84e26f523 Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Wed, 18 Jan 2012 13:46:26 -0800 Subject: allow recovery UI to ignore certain keypresses Change-Id: Id182bb95ffcc475c5acabb29b413e422302ae7f2 --- ui.cpp | 3 +++ ui.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ui.cpp b/ui.cpp index fd370a79f..bd0fcae62 100644 --- a/ui.cpp +++ b/ui.cpp @@ -123,6 +123,9 @@ void RecoveryUI::process_key(int key_code, int updown) { if (register_key) { switch (CheckKey(key_code)) { + case RecoveryUI::IGNORE: + break; + case RecoveryUI::TOGGLE: ShowText(!IsTextVisible()); break; diff --git a/ui.h b/ui.h index 750b99333..0d3b7bb98 100644 --- a/ui.h +++ b/ui.h @@ -73,7 +73,7 @@ class RecoveryUI { // Return value indicates whether an immediate operation should be // triggered (toggling the display, rebooting the device), or if // the key should be enqueued for use by the main thread. - enum KeyAction { ENQUEUE, TOGGLE, REBOOT }; + enum KeyAction { ENQUEUE, TOGGLE, REBOOT, IGNORE }; virtual KeyAction CheckKey(int key); // --- menu display --- -- cgit v1.2.3