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.cpp b/libs/fakeservicemanager/ServiceManager.cpp
index 9f0754b..61e4a98 100644
--- a/libs/fakeservicemanager/ServiceManager.cpp
+++ b/libs/fakeservicemanager/ServiceManager.cpp
@@ -84,4 +84,14 @@
return std::nullopt;
}
+status_t ServiceManager::registerForNotifications(const String16&,
+ const sp<LocalRegistrationCallback>&) {
+ return INVALID_OPERATION;
+}
+
+status_t ServiceManager::unregisterForNotifications(const String16&,
+ const sp<LocalRegistrationCallback>&) {
+ return INVALID_OPERATION;
+}
+
} // namespace android