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

Commit f2245aa5 authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

3304011 At times Talkback still works after disabling it.

Change-Id: If99ef28c6285a2d290d46518a07d69d5e22cca5b
parent e51f94cf
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);
                }
            }
        }