summaryrefslogtreecommitdiff
path: root/cmds/servicemanager/ServiceManager.h
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-10-28 10:52:34 -0700
committer Steven Moreland <smoreland@google.com> 2019-10-28 15:45:14 -0700
commitb82b8f84b48616c124e1d1421a985328c1df53dc (patch)
tree4a843b2614c81ac6b9e1477721800f0261b1fe2e /cmds/servicemanager/ServiceManager.h
parent1aed8b369dd977fba69134fc03bf3762c26c560c (diff)
ServiceManager: add isDeclared
Most of the time, AIDL services exist in client/service pairs. In this context, `while(true) getService` or `waitForService` makes sense. However, for VINTF services, this client/server coupling isn't guaranteed. A device may or may not have specific hardware. So, now IServiceManager can tell a client when a server will exist so it will know if it needs to wait for this service during boot-up. The function waitForDeclaredService is provided for this. These functions are generic (not referring to VINTF specifically) because they may be expanded to include information about APEX services in the future OR the infrastructure may be made generic to work, if desired, on system services. Bug: 141828236 Test: binderStabilityTest, using waitForDeclaredService function Change-Id: Ia230625e44e1685cc3fa9230ece8f0a25c88585e
Diffstat (limited to 'cmds/servicemanager/ServiceManager.h')
-rw-r--r--cmds/servicemanager/ServiceManager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds/servicemanager/ServiceManager.h b/cmds/servicemanager/ServiceManager.h
index 006e51947b..7dcdaa4661 100644
--- a/cmds/servicemanager/ServiceManager.h
+++ b/cmds/servicemanager/ServiceManager.h
@@ -40,6 +40,7 @@ public:
const sp<IServiceCallback>& callback) override;
binder::Status unregisterForNotifications(const std::string& name,
const sp<IServiceCallback>& callback) override;
+ binder::Status isDeclared(const std::string& name, bool* outReturn) override;
void binderDied(const wp<IBinder>& who) override;