diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-03-22 17:09:11 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2013-03-22 17:13:01 -0700 |
commit | cefac5acc845bc0fd36cb2c7e9e0992ecda33230 (patch) | |
tree | ec52886b547e6a15c7510e2156c1914beb3395a7 /services | |
parent | 81cce37deda2bd097d245c4d54806a354971a97c (diff) | |
download | frameworks_base-cefac5acc845bc0fd36cb2c7e9e0992ecda33230.zip frameworks_base-cefac5acc845bc0fd36cb2c7e9e0992ecda33230.tar.gz frameworks_base-cefac5acc845bc0fd36cb2c7e9e0992ecda33230.tar.bz2 |
Incorrect unbinding of accessibility services.
If no accessibility services are enabled, we disable the
accessibility event firing to save resources. When the last
such services is disabled the system was not unbinding. As
a result the user was seeing the touch exploration enable
dialog when the service that requested it is disabled. Also
there is one service the system is bound to that is not used.
bug:8439191
Change-Id: I6f37f2573a815bfb29870298aa0abbb1fa105588
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/accessibility/AccessibilityManagerService.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/services/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/java/com/android/server/accessibility/AccessibilityManagerService.java index d84018f..527e891 100644 --- a/services/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -1070,14 +1070,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { if (userState.mBindingServices.contains(componentName)) { continue; } - // No enabled installed services => disable accessibility to avoid - // sending accessibility events with no recipient across processes. - if (userState.mEnabledServices.isEmpty()) { - userState.mIsAccessibilityEnabled = false; - Settings.Secure.putIntForUser(mContext.getContentResolver(), - Settings.Secure.ACCESSIBILITY_ENABLED, 0, userState.mUserId); - return; - } if (userState.mEnabledServices.contains(componentName)) { if (service == null) { service = new Service(userState.mUserId, componentName, installedService); @@ -1098,6 +1090,14 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { } } } + + // No enabled installed services => disable accessibility to avoid + // sending accessibility events with no recipient across processes. + if (isEnabled && userState.mEnabledServices.isEmpty()) { + userState.mIsAccessibilityEnabled = false; + Settings.Secure.putIntForUser(mContext.getContentResolver(), + Settings.Secure.ACCESSIBILITY_ENABLED, 0, userState.mUserId); + } } private void scheduleUpdateClientsIfNeededLocked(UserState userState) { |