Use startActivity to launch ANR app
This will allow us to communicate with the app, so that we can learn
about the app's window token, displayId, and PID. This will also allow
the app to notify the test when the input event is received. This will
help the test avoid closing the uinput device prematurely.
Outstanding issues in this test:
1. Some of the injection that's occurring is still done using
"uiobject::click" instead of using uinput. The difficulty here is
that we need a way to wait for the ANR window to disappear after
clicking to prevent the uinput device from getting closed too soon.
To do this, we may be able to match a window by the window's name.
This kind of refactor should be done in a separate CL.
2. The test needs to be skipped on devices that don't support error
dialogs.
Bug: 339924248
Flag: TEST_ONLY
Test: atest AnrTest
Change-Id: Ic944d8a2558237d29a6155abe2a0271cb3e982b6
diff --git a/tests/Input/Android.bp b/tests/Input/Android.bp
index 1f0bd61..544f94b 100644
--- a/tests/Input/Android.bp
+++ b/tests/Input/Android.bp
@@ -15,6 +15,7 @@
"modules-utils-testable-device-config-defaults",
],
srcs: [
+ "src/**/*.aidl",
"src/**/*.java",
"src/**/*.kt",
],