summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yifan Hong <elsk@google.com> 2019-09-10 19:35:55 -0700
committer Yifan Hong <elsk@google.com> 2019-09-11 12:21:05 -0700
commitc346a16e6593ec27307e0a0f642389f4a2d4654c (patch)
tree08b7d43903196bac1ff28ac59acd8aacccba8c5a
parent45f75b719dc480e915b9fce16a1e417423b2caf1 (diff)
lshal: use new libvintf API
forEachInstanceOfVersion now requires a HalFormat arg now. Right now, lshal only works on HIDL hals. We will re-visit this code when we need lshal for staidl hals as well. Bug: 140832836 Test: lshal_test Change-Id: I721dff82ec6aeb4473236c5c78694d366893eb30
-rw-r--r--cmds/lshal/ListCommand.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index ad7e4c490f..a7ccf64c50 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -163,11 +163,11 @@ template <typename ObjectType>
VintfInfo getVintfInfo(const std::shared_ptr<const ObjectType>& object,
const FqInstance& fqInstance, vintf::TransportArch ta, VintfInfo value) {
bool found = false;
- (void)object->forEachInstanceOfVersion(fqInstance.getPackage(), fqInstance.getVersion(),
- [&](const auto& instance) {
- found = match(instance, fqInstance, ta);
- return !found; // continue if not found
- });
+ (void)object->forEachHidlInstanceOfVersion(fqInstance.getPackage(), fqInstance.getVersion(),
+ [&](const auto& instance) {
+ found = match(instance, fqInstance, ta);
+ return !found; // continue if not found
+ });
return found ? value : VINTF_INFO_EMPTY;
}
@@ -453,7 +453,7 @@ bool ListCommand::addEntryWithoutInstance(const TableEntry& entry,
}
bool found = false;
- (void)manifest->forEachInstanceOfVersion(package, version, [&found](const auto&) {
+ (void)manifest->forEachHidlInstanceOfVersion(package, version, [&found](const auto&) {
found = true;
return false; // break
});
@@ -797,9 +797,9 @@ Status ListCommand::fetchManifestHals() {
std::map<std::string, TableEntry> entries;
- manifest->forEachInstance([&] (const vintf::ManifestInstance& manifestInstance) {
+ manifest->forEachHidlInstance([&] (const vintf::ManifestInstance& manifestInstance) {
TableEntry entry{
- .interfaceName = manifestInstance.getFqInstance().string(),
+ .interfaceName = manifestInstance.description(),
.transport = manifestInstance.transport(),
.arch = manifestInstance.arch(),
// TODO(b/71555570): Device manifest does not distinguish HALs from vendor or ODM.