OSDN Git Service

Invalid active window if temporary disabling accessibility for test tools.
authorSvetoslav <svetoslavganov@google.com>
Thu, 25 Sep 2014 23:48:53 +0000 (16:48 -0700)
committerSvetoslav <svetoslavganov@google.com>
Thu, 25 Sep 2014 23:57:11 +0000 (16:57 -0700)
commit3f92ffc369c31c98620e22b66366adb93c60a5f8
treee6779a0e9970fb076485725036d67e45cad61707
parentdd81183bbea34109e1ae2d75667fe4784be6132f
Invalid active window if temporary disabling accessibility for test tools.

If accessibility is enabled and a test tool based on the accessibility APIs
connects to the system we suspend the current accessibility services while
the tool is running (to avoid inteference as the tool is such a service) and
after the tool disconnects we restore the accessibility state. The issue is
that when clearing the accessibility state we were also wrongly clearing the
active window. We are now careful to not clear the active window in such a
case.

It is also possible that the active window was never initilaized before the
tool is run so now it is lazily loaded such that if we do not know which one
it is, we get the one the has input focus. The definition of an active window
is the one that has input focus or the user is touching.

bug:17663432

Change-Id: I8868866a5126c590d3bddad099ababb97978227a
services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java