Merge "Move configureRpcThreadpool into sources."
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index 91d56e7..547f7e7 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -77,6 +77,16 @@
             vintf::VintfObject::GetDeviceHalManifest());
 }
 
+namespace details {
+bool debuggable() {
+#ifdef LIBHIDL_TARGET_DEBUGGABLE
+    return true;
+#else
+    return false;
+#endif
+}
+}  // namespace details
+
 hidl_handle::hidl_handle() {
     mHandle = nullptr;
     mOwnsHandle = false;
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index a16701b..7737011 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -63,6 +63,11 @@
 vintf::Transport getTransport(const std::string &interfaceName,
                               const std::string &instanceName);
 
+namespace details {
+// Return true on userdebug / eng builds and false on user builds.
+bool debuggable();
+} //  namespace details
+
 // hidl_death_recipient is a callback interfaced that can be used with
 // linkToDeath() / unlinkToDeath()
 struct hidl_death_recipient : public virtual RefBase {
diff --git a/manifest.xml b/manifest.xml
index 06b57b6..02cd8a1 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -21,7 +21,7 @@
     </hal>
     <hal>
         <name>android.hidl.memory</name>
-        <transport>passthrough</transport>
+        <transport arch="32+64">passthrough</transport>
         <version>1.0</version>
         <interface>
             <name>IMapper</name>
diff --git a/transport/HidlBinderSupport.cpp b/transport/HidlBinderSupport.cpp
index 30c2323..746c2f9 100644
--- a/transport/HidlBinderSupport.cpp
+++ b/transport/HidlBinderSupport.cpp
@@ -25,10 +25,6 @@
 #include <fstream>
 #include <sstream>
 
-#ifdef LIBHIDL_TARGET_DEBUGGABLE
-#include <android-base/logging.h>
-#endif
-
 namespace android {
 namespace hardware {
 
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index a1e570f..15abb92 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -186,8 +186,7 @@
         return nullptr;
     }
 
-    Return<bool> add(const hidl_vec<hidl_string>& /* interfaceChain */,
-                     const hidl_string& /* name */,
+    Return<bool> add(const hidl_string& /* name */,
                      const sp<IBase>& /* service */) override {
         LOG(FATAL) << "Cannot register services with passthrough service manager.";
         return false;
diff --git a/transport/manager/1.0/IServiceManager.hal b/transport/manager/1.0/IServiceManager.hal
index 2bbbe22..77cf253 100644
--- a/transport/manager/1.0/IServiceManager.hal
+++ b/transport/manager/1.0/IServiceManager.hal
@@ -52,23 +52,26 @@
     get(string fqName, string name) generates (interface service);
 
     /**
-     * Register a service. The service manager must be registered as all of the
-     * services that it inherits from.
+     * Register a service. The service manager must retrieve the (inherited)
+     * interfaces that this service implements, and register them along with
+     * the service.
+     *
+     * Each interface must have its own namespace for instance names. If you
+     * have two unrelated interfaces IFoo and IBar, it must be valid to call:
+     *
+     * add("my_instance", foo); // foo implements IFoo
+     * add("my_instance", bar); // bar implements IBar
      *
      * WARNING: This function is for libhidl/HwBinder use only. You are likely
      * looking for 'INTERFACE::registerAsService("name")' instead.
      *
-     * @param interfaceChain List of fully-qualified interface names. The first
-     *                       must be the actual interface name. Subsequent names must
-     *                       follow the inheritance hierarchy of the interface.
      * @param name           Instance name. Must also be used to retrieve service.
      * @param service        Handle to registering service.
      *
      * @return success       Whether or not the service was registered.
      *
      */
-    add(vec<string> interfaceChain, string name, interface service)
-        generates (bool success);
+    add(string name, interface service) generates (bool success);
 
     /**
      * List all registered services. Must be sorted.