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

Commit b9dec1c3 authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am a60fdfac: NPE in AccessibilityManagerService.

* commit 'a60fdfac':
  NPE in AccessibilityManagerService.
parents bf2798b3 a60fdfac
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -1741,25 +1741,23 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {

        @Override
        public void onServiceConnected(ComponentName componentName, IBinder service) {
            final int connectionId;
            synchronized (mLock) {
                connectionId = mId;
                mService = service;
                mServiceInterface = IAccessibilityServiceClient.Stub.asInterface(service);
                UserState userState = getUserStateLocked(mUserId);
                addServiceLocked(this, userState);
                if (!userState.mBindingServices.contains(mComponentName)) {
                    binderDied();
                } else {
                if (userState.mBindingServices.contains(mComponentName)) {
                    userState.mBindingServices.remove(mComponentName);
                    onUserStateChangedLocked(userState);
                }
            }
                    try {
                mServiceInterface.setConnection(this, connectionId);
                        mServiceInterface.setConnection(this, mId);
                    } catch (RemoteException re) {
                        Slog.w(LOG_TAG, "Error while setting connection for service: " + service, re);
                    }
                } else {
                    binderDied();
                }
            }
        }

        @Override