Poll when asserting the touch mode state

To address test flakiness, this changelist enhances touch mode state assertions by polling the touch mode state instead of just relying on a single state check.
Additionally, it modifies the `touchDownOnDefaultDisplay` test by sending motion events specifically to the test activity, rather than arbitrary positions on the default display.

Fix: 364103887
Test: atest CtsInputTestCases:android.input.cts.TouchModeTest
Flag: TEST_ONLY
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:df1ae34a64dc19f2e46fa31559bdf39edcf904a6)
Merged-In: I573c82ffac0bc5685ee678c94d01ea6b85942b6a
Change-Id: I573c82ffac0bc5685ee678c94d01ea6b85942b6a
1 file changed