allow recovery UI to ignore certain keypresses
Change-Id: Id182bb95ffcc475c5acabb29b413e422302ae7f2
This commit is contained in:
parent
6639248d02
commit
48b5b0737c
2 changed files with 4 additions and 1 deletions
3
ui.cpp
3
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;
|
||||
|
|
2
ui.h
2
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 ---
|
||||
|
|
Loading…
Reference in a new issue