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
diff --git a/device.h b/device.h
index 9c43371..cbecc43 100644
--- a/device.h
+++ b/device.h
@@ -47,6 +47,7 @@
MOUNT_SYSTEM = 10,
RUN_GRAPHICS_TEST = 11,
RUN_LOCALE_TEST = 12,
+ KEY_INTERRUPTED = 13,
};
explicit Device(RecoveryUI* ui);