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

Commit 5c940e62 authored by Yifan Hong's avatar Yifan Hong Committed by Automerger Merge Worker
Browse files

Merge "Add ServiceManager.registerForNotifications" am: ce80de5d am: 45ddf12c am: 3b546f86

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

Change-Id: Ic5346dff7ffdb0f2d0d8e911cb931db167c7a2b0
parents 9b017b05 3b546f86
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -297,6 +297,17 @@ public final class ServiceManager {
        return isDeclared(name) ? waitForService(name) : null;
    }

    /**
     * Register callback for service registration notifications.
     *
     * @throws RemoteException for underlying error.
     * @hide
     */
    public static void registerForNotifications(
            @NonNull String name, @NonNull IServiceCallback callback) throws RemoteException {
        getIServiceManager().registerForNotifications(name, callback);
    }

    /**
     * Return a list of all currently running services.
     * @return an array of all currently running services, or <code>null</code> in
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ class ServiceManagerProxy implements IServiceManager {

    public void registerForNotifications(String name, IServiceCallback cb)
            throws RemoteException {
        throw new RemoteException();
        mServiceManager.registerForNotifications(name, cb);
    }

    public void unregisterForNotifications(String name, IServiceCallback cb)