Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63eeff74 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Accessiiblity in right state upon connection of a test agent."

parents bec9be2f 9dc98e3d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -441,6 +441,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
            if (oldService != null) {
                tryRemoveServiceLocked(oldService);
            }
            // This API is intended for testing so enable accessibility to make
            // sure clients can start poking with the window content.
            Settings.Secure.putInt(mContext.getContentResolver(),
                    Settings.Secure.ACCESSIBILITY_ENABLED, 1);
            // Also disable all accessibility services to avoid interference
            // with the tests.
            Settings.Secure.putString(mContext.getContentResolver(),
                    Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES, "");
        }
        AccessibilityServiceInfo accessibilityServiceInfo = new AccessibilityServiceInfo();
        accessibilityServiceInfo.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;