Make sure focused window is tracked by accessibility even if it is obscured.

Although, I don't think the an obscured focused window should be reported,
Talkback treats untracked/obscured windows or "invisible windows" as IMEs.
When it WINDOW_STATE_CHANGED events from these windows, it will always announce it.
So without this fix, the serioes of window events that are sent from a now obscured window, that are sent in transition, are all announced.
Ideally, we can get rid of that hack, because it was initially made to address a race condition that is already fixed.
But gBoard, and probably a few other keyboards, would regress because they send WINDOW_STATE_CHANGE events to announce to the user the keyboard is hidden.

In our next release, we should probably get rid of the Talkback hack, get keyboards to use the correct accessibility semantics, and also make sure obscured windows aren't spamming services with Events.

Change-Id: I70b8a2ed3c37ca2613f453254ec33980580409c8
Fix: 123958978
Test: The bug no longer reproduces. IME announcements are made as expected, CTSAccessibility* all pass.
1 file changed