OSDN Git Service

Accessibility in bad state after using SDK tool uiautomatorviewer.
authorSvetoslav <svetoslavganov@google.com>
Thu, 25 Sep 2014 22:56:28 +0000 (15:56 -0700)
committerSvetoslav <svetoslavganov@google.com>
Thu, 25 Sep 2014 22:56:31 +0000 (15:56 -0700)
The UiAutormator tool is a part of the SDK. If it is run while
accessibility is enabled it stops all accessibility services
as it is an accessibility service itself to avoid interference
and when done restores back the accessibility state. The issue
was that the accessibility state is not restored leaving the
device in a bad state.

bug:17662770

Change-Id: I3c4f46fa05c76b874eeffdeb867ef433c3fedf2e

services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java

index ac78630..008830d 100644 (file)
@@ -2599,6 +2599,9 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
                     userState.mInstalledServices.remove(mAccessibilityServiceInfo);
                     userState.mEnabledServices.remove(mComponentName);
                     userState.destroyUiAutomationService();
+                    if (readConfigurationForUserStateLocked(userState)) {
+                        onUserStateChangedLocked(userState);
+                    }
                 }
             }
         }