Fix(CTS): Correct WindowUntrustedTouchTest for Automotive multi tasking
environment
The `testWhen...ToastWindow_allowsTouch` tests fail on certain
Automotive targets where the toast does not appear within the test
activity's bounds. This causes both an incorrect bounds assertion
and a missed touch event when the test taps the toast's location.
This change fixes the test by:
1. Tapping the center of the intersection of the toast and activity
rectangles. If they do not intersect, the test is skipped.
2. Skipping the initial toast bounds check on devices that feature
automotive split-screen multitasking, where toasts may be routed
to a dedicated system area.
Bug: 415961974
Flag: EXEMPT test only fix
Test: Tested on Automotive custom targets
Test: atest CtsWindowManagerDeviceInput:android.server.wm.input.WindowUntrustedTouchTest#testWhenSelfTextToastWindow_allowsTouch
Change-Id: I2bf346cbaaa2671b575680441943c1d77456086e
2 files changed