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

Commit ab17ddf6 authored by Christoph Studer's avatar Christoph Studer Committed by Android Git Automerger
Browse files

am 44ff0d4e: Merge "NoMan: Allow SysUI to register as listener" into lmp-preview-dev

* commit '44ff0d4e5b59b15788f9b5ad01ef82b59237c8a7':
  NoMan: Allow SysUI to register as listener
parents 6c89347f 00b206e3
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -175,7 +175,10 @@ abstract public class ManagedServices {

    public void registerService(IInterface service, ComponentName component, int userid) {
        checkNotNull(service);
        registerServiceImpl(service, component, userid);
        ManagedServiceInfo info = registerServiceImpl(service, component, userid);
        if (info != null) {
            onServiceAdded(info);
        }
    }

    /**
@@ -464,7 +467,7 @@ abstract public class ManagedServices {
        }
    }

    private void registerServiceImpl(final IInterface service,
    private ManagedServiceInfo registerServiceImpl(final IInterface service,
            final ComponentName component, final int userid) {
        synchronized (mMutex) {
            try {
@@ -472,10 +475,12 @@ abstract public class ManagedServices {
                        true /*isSystem*/, null, Build.VERSION_CODES.L);
                service.asBinder().linkToDeath(info, 0);
                mServices.add(info);
                return info;
            } catch (RemoteException e) {
                // already dead
            }
        }
        return null;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -1264,7 +1264,7 @@ public class NotificationManagerService extends SystemService {
        @Override
        public void registerListener(final INotificationListener listener,
                final ComponentName component, final int userid) {
            checkCallerIsSystem();
            enforceSystemOrSystemUI("INotificationManager.registerListener");
            mListeners.registerService(listener, component, userid);
        }