Add public forEachHidlInstanceOfInterface/Version
- Add private forEachInstanceOfVersion/Interface that takes
an additional HalFormat arg
- Add public forEachHidlInstanceOfVersion/Interface that
only loops over HIDL instances
- Hide existing forEachInstanceOfVersion/Interface because
they do not specify HalFormat. These two functions are deprecated
and will be removed in follow up CL.
Test: libvintf_test
Test: vintf_object_test
Bug: 140832836
Change-Id: Ie4b361f1207f721747cec864511c22ab0be6fe50
diff --git a/VintfObject.cpp b/VintfObject.cpp
index 69fbff6..ce037a5 100644
--- a/VintfObject.cpp
+++ b/VintfObject.cpp
@@ -799,7 +799,8 @@
const std::vector<std::string>& /* hintInstances */) {
std::vector<std::pair<std::string, Version>> ret;
deviceManifest->forEachInstanceOfInterface(
- package, version, interface, [&ret](const ManifestInstance& manifestInstance) {
+ HalFormat::HIDL, package, version, interface,
+ [&ret](const ManifestInstance& manifestInstance) {
ret.push_back(
std::make_pair(manifestInstance.instance(), manifestInstance.version()));
return true;