Make registerPassthroughClient() synchronous.
And remove the PID argument.
Bug: 37730021
Test: lshal shows passthrough clients again
Merged-In: I0bee20ae5cde36dbc86662654d0ac9e9489bf0a2
Change-Id: I0bee20ae5cde36dbc86662654d0ac9e9489bf0a2
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index 0e56d18..8121911 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -196,7 +196,7 @@
<< ": null binderized manager.";
return;
}
- auto ret = binderizedManager->registerPassthroughClient(interfaceName, instanceName, getpid());
+ auto ret = binderizedManager->registerPassthroughClient(interfaceName, instanceName);
if (!ret.isOk()) {
LOG(WARNING) << "Could not registerReference for "
<< interfaceName << "/" << instanceName
@@ -341,7 +341,7 @@
return Void();
}
- Return<void> registerPassthroughClient(const hidl_string &, const hidl_string &, int32_t) override {
+ Return<void> registerPassthroughClient(const hidl_string &, const hidl_string &) override {
// This makes no sense.
LOG(FATAL) << "Cannot call registerPassthroughClient on passthrough service manager. "
<< "Call it on defaultServiceManager() instead.";
diff --git a/transport/manager/1.0/IServiceManager.hal b/transport/manager/1.0/IServiceManager.hal
index 1a37c54..2b59a56 100644
--- a/transport/manager/1.0/IServiceManager.hal
+++ b/transport/manager/1.0/IServiceManager.hal
@@ -156,9 +156,9 @@
/**
* When the passthrough service manager returns a service via
* get(string, string), it must dispatch a registerPassthroughClient call
- * to the binderized service manager to indicate which process has called
- * get. Binderized service manager must record this PID, which can
+ * to the binderized service manager to indicate the current process has
+ * called get(). Binderized service manager must record this PID, which can
* be retrieved via debugDump.
*/
- oneway registerPassthroughClient(string fqName, string name, int32_t pid);
+ registerPassthroughClient(string fqName, string name);
};