Implement ShowMenu for StubRecoveryUI
The ShowMenu in StubRecoveryUI used to return initial selection
immediately. This leads to an immediate reboot if we enter recovery
with a stub UI and wait for user's input. This cl changes the behavior
of stub UI's ShowMenu so that it waits keys in loop, and only returns in
the case of interruption or time out.
Bug: 130535924
Test: start recovery with a stub UI, wait for the timeout
Change-Id: I96ad8aad8930756b09101bb98ba5fbe7b53bcb37
diff --git a/recovery_ui/Android.bp b/recovery_ui/Android.bp
index ee3149d..149ef8a 100644
--- a/recovery_ui/Android.bp
+++ b/recovery_ui/Android.bp
@@ -23,6 +23,7 @@
srcs: [
"device.cpp",
"screen_ui.cpp",
+ "stub_ui.cpp",
"ui.cpp",
"vr_ui.cpp",
"wear_ui.cpp",