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

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

Merge "3304011 At times Talkback still works after disabling it."

parents 5509ff46 f2245aa5
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -587,15 +587,17 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
                    intalledService.name);
            Service service = componentNameToServiceMap.get(componentName);

            if (isEnabled && enabledServices.contains(componentName)) {
                if (service == null) {
            if (isEnabled) {
                if (enabledServices.contains(componentName) && service == null) {
                    new Service(componentName).bind();
                } else if (!enabledServices.contains(componentName) && service != null) {
                    // clean up done in Service#onServiceDisconnected
                    service.unbind();
                }
            } else {
                if (service != null) {
                    // clean up done in Service#onServiceDisconnected
                    service.unbind();
                    componentNameToServiceMap.remove(componentName);
                    services.remove(service);
                }
            }
        }