From b76af93ab56bc3296e01e65a6fe64a0622ab5b91 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Tue, 22 May 2018 12:08:35 -0700 Subject: recovery: Add ability to interrupt UI Normally calling a UI method will block indefinitely until the UI is actually used. This creates a method to interrupt the UI, causing waitKey to return -2. This in turn, will cause ShowMenu to return -2. This allows switching between recovery and fastbootd via usb commands. Test: adb shell /data/nativetest64/recovery_unit_test/recovery_unit_test Bug: 78793464 Change-Id: I4c6c9aa18d79070877841a5c9818acf723fa6096 --- device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'device.h') diff --git a/device.h b/device.h index 9c433715b..cbecc4371 100644 --- a/device.h +++ b/device.h @@ -47,6 +47,7 @@ class Device { MOUNT_SYSTEM = 10, RUN_GRAPHICS_TEST = 11, RUN_LOCALE_TEST = 12, + KEY_INTERRUPTED = 13, }; explicit Device(RecoveryUI* ui); -- cgit v1.2.3