diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2010-12-29 19:22:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-29 19:22:07 -0800 |
commit | 03c5dd91a048afe86d8c4f859bddaab1a4f327bf (patch) | |
tree | b0f4ee862d49ba63cfaf7f3aa29f5a9b3c847d5c | |
parent | 5509ff46337bc084af1a6a878dfab4a3eef93ba9 (diff) | |
parent | f2245aa5d7f5d6f0ea6d55fb2acc66624b2ef13f (diff) | |
download | frameworks_base-03c5dd91a048afe86d8c4f859bddaab1a4f327bf.zip frameworks_base-03c5dd91a048afe86d8c4f859bddaab1a4f327bf.tar.gz frameworks_base-03c5dd91a048afe86d8c4f859bddaab1a4f327bf.tar.bz2 |
Merge "3304011 At times Talkback still works after disabling it."
-rw-r--r-- | services/java/com/android/server/AccessibilityManagerService.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/services/java/com/android/server/AccessibilityManagerService.java b/services/java/com/android/server/AccessibilityManagerService.java index d38522c..77b6dd0 100644 --- a/services/java/com/android/server/AccessibilityManagerService.java +++ b/services/java/com/android/server/AccessibilityManagerService.java @@ -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); } } } |