Fix invalid active window if accessibility framework doesn't track
windows

If accessibility framework doesn't track windows, the active window
is updated when receving window_state_changed event. ViewRootImpl
sends this event when performing traversal first time, however the
focused window token is not updated yet from InputManagerService.
To fix the regression issue, we fallback to the legacy approach for
short term solution.

Test: atest android.accessibilityservice.cts
Bug: 228442331
Change-Id: I032a73b9f4cf408a5dd6cae8a87bd26131ebdbfa
4 files changed