Fix flaky issue

When getting the accessibility window after changing the focused window
of the activity from default display to virtual display, to make sure
getting the latest one, needing to wait receiving the event,
WINDOWS_CHANGE_FOCUSED or WINDOWS_CHANGE_ACTIVE.

Bug: 144845224
Test: atest --iterations 20 AccessibilityWindowReportingTest#
moveFocusToAnotherDisplay_movesActiveAndFocusWindow

Change-Id: Ic8271a1e0e4cdb76efd237bdc8b33328fd9be5e0
1 file changed