getTransport checks interface and instance names.
If <interface> is missing from the manifest, it returns
<transport> only if instanceName == "default", and EMPTY
otherwise.
Bug: 35219444
Test: hidl_test
Test: camera, soundtrigger works on marlin
Test: video playback works on marlin
Change-Id: Iaae6ae9bbf5f8c97fae63f2ac41595d822f781ca
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 92a0e96..a16701b 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -57,9 +57,11 @@
namespace hardware {
// Get transport method from vendor interface manifest.
-// name has the format "android.hardware.foo@1.0::IFoo"
+// interfaceName has the format "android.hardware.foo@1.0::IFoo"
+// instanceName is "default", "ashmem", etc.
// If it starts with "android.hidl.", a static map is looked up instead.
-vintf::Transport getTransport(const std::string &name);
+vintf::Transport getTransport(const std::string &interfaceName,
+ const std::string &instanceName);
// hidl_death_recipient is a callback interfaced that can be used with
// linkToDeath() / unlinkToDeath()