am 320a31c6: Merge "Incorrect unbinding of accessibility services." into jb-mr2-dev
* commit '320a31c604230566c2d269edf4327c97d99966a1': Incorrect unbinding of accessibility services.
This commit is contained in:
@@ -1070,14 +1070,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
|
|||||||
if (userState.mBindingServices.contains(componentName)) {
|
if (userState.mBindingServices.contains(componentName)) {
|
||||||
continue;
|
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 (userState.mEnabledServices.contains(componentName)) {
|
||||||
if (service == null) {
|
if (service == null) {
|
||||||
service = new Service(userState.mUserId, componentName, installedService);
|
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) {
|
private void scheduleUpdateClientsIfNeededLocked(UserState userState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user