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

Commit a5f9c634 authored by Chris Wren's avatar Chris Wren Committed by android-build-merger
Browse files

Merge "revert recent changes around system listener registrations" into nyc-dev

am: 46820517

* commit '46820517':
  revert recent changes around system listener registrations
parents 7ed17fbd 46820517
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -119,7 +119,13 @@ public abstract class NotificationRankerService extends NotificationListenerServ
    @Override
    public void registerAsSystemService(Context context, ComponentName componentName,
            int currentUser)  {
        throw new IllegalStateException("the ranker may not start itself.");
        throw new UnsupportedOperationException("the ranker lifecycle is managed by the system.");
    }

    /** @hide */
    @Override
    public void unregisterAsSystemService()  {
        throw new UnsupportedOperationException("the ranker lifecycle is managed by the system.");
    }

    @Override
+1 −10
Original line number Diff line number Diff line
@@ -1444,17 +1444,8 @@ public class NotificationManagerService extends SystemService {
         */
        @Override
        public void unregisterListener(INotificationListener token, int userid) {
            final long identity = Binder.clearCallingIdentity();
            try {
                if(mRankerServices.checkServiceTokenLocked(token) != null) {
                    mRankerServices.unregisterService(token, userid);
                } else {
            mListeners.unregisterService(token, userid);
        }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }

        /**
         * Allow an INotificationListener to simulate a "clear all" operation.