Merge "Incorrect unbinding of accessibility services." into jb-mr2-dev
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user