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

Commit 91cee2b5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "After an ax service permanently crashes, it won't eat keys"

parents 54d918d3 fba2c8fb
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -3743,6 +3743,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub

        /**
         * Removes a service.
         * There are three states to a service here: off, bound, and binding.
         * This stops tracking the service as bound.
         *
         * @param serviceConnection The service.
         */
@@ -3759,6 +3761,19 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
            scheduleNotifyClientsOfServicesStateChange(this);
        }

        /**
         * Make sure a services disconnected but still 'on' state is reflected in UserState
         * There are three states to a service here: off, bound, and binding.
         * This drops a service from a bound state, to the binding state.
         * The binding state describes the situation where a service is on, but not bound.
         *
         * @param serviceConnection The service.
         */
        public void serviceDisconnectedLocked(AccessibilityServiceConnection serviceConnection) {
            removeServiceLocked(serviceConnection);
            mBindingServices.add(serviceConnection.getComponentName());
        }

        public Set<ComponentName> getBindingServicesLocked() {
            return mBindingServices;
        }
+4 −1
Original line number Diff line number Diff line
@@ -258,7 +258,10 @@ class AccessibilityServiceConnection extends AbstractAccessibilityServiceConnect
                return;
            }
            mWasConnectedAndDied = true;
            resetLocked();
            UserState userState = mUserStateWeakReference.get();
            if (userState != null) {
                userState.serviceDisconnectedLocked(this);
            }
            if (mId == mSystemSupport.getMagnificationController().getIdOfLastServiceToMagnify()) {
                mSystemSupport.getMagnificationController().resetIfNeeded(true);
            }