IServiceManager: add registerForNotifications.
This can help binder clients know when a service has been registered.
Potentially helpful, in situations where some HALs take some seconds to
come up and register with service manager.
Bug: 196432585
Test: manual
Test: binderLibTest
Change-Id: Ib1d9b967a7cffa99f43dc26f9025caf1f59ab77f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/libs/fakeservicemanager/ServiceManager.h b/libs/fakeservicemanager/ServiceManager.h
index b1496ba..6d6e008 100644
--- a/libs/fakeservicemanager/ServiceManager.h
+++ b/libs/fakeservicemanager/ServiceManager.h
@@ -53,6 +53,11 @@
std::optional<IServiceManager::ConnectionInfo> getConnectionInfo(const String16& name) override;
+ status_t registerForNotifications(const String16& name,
+ const sp<LocalRegistrationCallback>& callback) override;
+
+ status_t unregisterForNotifications(const String16& name,
+ const sp<LocalRegistrationCallback>& callback) override;
private:
std::map<String16, sp<IBinder>> mNameToService;
};