Add critical event to relevantEvents.
When no WindowsForAccessibilityCallback is registered or no a11y
service watches events affected the active window, mActiveWindowId
won't be updated accordingly. This causes some a11y events can't
be dispatched due to mismatch of window id.
We need to add TYPE_WINDOW_STATE_CHANGED event to relevantEvents
in order to keep mActiveWindowId up-to-date once the packages are
not excluded from whitelist.
Bug: 118096360
Test: a11y CTS & unit test
Change-Id: Id139572cd350ba5d1b1927fe1fc94dc0d8ec6279
1 file changed