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

Commit 8d8adc43 authored by Daniel Norman's avatar Daniel Norman Committed by Automerger Merge Worker
Browse files

Merge "Disable all A11yServices from an uninstalled package." into rvc-dev am:...

Merge "Disable all A11yServices from an uninstalled package." into rvc-dev am: e6d10db5 am: 9e3a6a62 am: 994e8238 am: 6f79c2ef am: f75b18a2 am: 3e56f76f am: e46e6e91

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20123964



Change-Id: I994b8403db746112cb433860dbdad79558b5b5dc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6b311488 e46e6e91
Loading
Loading
Loading
Loading
+13 −11
Original line number Original line Diff line number Diff line
@@ -657,24 +657,26 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
                    userState.mBindingServices.removeIf(filter);
                    userState.mBindingServices.removeIf(filter);
                    userState.mCrashedServices.removeIf(filter);
                    userState.mCrashedServices.removeIf(filter);
                    final Iterator<ComponentName> it = userState.mEnabledServices.iterator();
                    final Iterator<ComponentName> it = userState.mEnabledServices.iterator();
                    boolean anyServiceRemoved = false;
                    while (it.hasNext()) {
                    while (it.hasNext()) {
                        final ComponentName comp = it.next();
                        final ComponentName comp = it.next();
                        final String compPkg = comp.getPackageName();
                        final String compPkg = comp.getPackageName();
                        if (compPkg.equals(packageName)) {
                        if (compPkg.equals(packageName)) {
                            it.remove();
                            it.remove();
                            userState.mTouchExplorationGrantedServices.remove(comp);
                            anyServiceRemoved = true;
                        }
                    }
                    if (anyServiceRemoved) {
                        // Update the enabled services setting.
                        // Update the enabled services setting.
                        persistComponentNamesToSettingLocked(
                        persistComponentNamesToSettingLocked(
                                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
                                Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
                                userState.mEnabledServices, userId);
                                userState.mEnabledServices, userId);
                        // Update the touch exploration granted services setting.
                        // Update the touch exploration granted services setting.
                            userState.mTouchExplorationGrantedServices.remove(comp);
                        persistComponentNamesToSettingLocked(
                        persistComponentNamesToSettingLocked(
                                    Settings.Secure.
                                Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
                                    TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
                                userState.mTouchExplorationGrantedServices, userId);
                                userState.mTouchExplorationGrantedServices, userId);
                        onUserStateChangedLocked(userState);
                        onUserStateChangedLocked(userState);
                            return;
                        }
                    }
                    }
                }
                }
            }
            }