Merge "Make registerPassthroughClient() synchronous."
diff --git a/ServiceManager.cpp b/ServiceManager.cpp
index 7c4d90e..973da58 100644
--- a/ServiceManager.cpp
+++ b/ServiceManager.cpp
@@ -340,7 +340,8 @@
 
 
 Return<void> ServiceManager::registerPassthroughClient(const hidl_string &fqName,
-        const hidl_string &name, int32_t pid) {
+        const hidl_string &name) {
+    pid_t pid = IPCThreadState::self()->getCallingPid();
 
     PackageInterfaceMap &ifaceMap = mServiceMap[fqName];
 
diff --git a/ServiceManager.h b/ServiceManager.h
index 0b99a4e..9fafadf 100644
--- a/ServiceManager.h
+++ b/ServiceManager.h
@@ -45,7 +45,7 @@
 
     Return<void> debugDump(debugDump_cb _cb) override;
     Return<void> registerPassthroughClient(const hidl_string &fqName,
-            const hidl_string &name, int32_t pid) override;
+            const hidl_string &name) override;
 
     virtual void serviceDied(uint64_t cookie, const wp<IBase>& who);
 private: