OSDN Git Service

Update to allow multiple HALs in a manifest.
authorYifan Hong <elsk@google.com>
Thu, 13 Apr 2017 08:00:12 +0000 (01:00 -0700)
committerYifan Hong <elsk@google.com>
Thu, 13 Apr 2017 08:00:12 +0000 (01:00 -0700)
Test: libvintf_test
Test: lshal --init_vintf

Bug: 37294247
Change-Id: I202787d7856db6e06e595bd52c644f6a0eefcb66

cmds/lshal/Lshal.cpp

index 4c57361..33bc43c 100644 (file)
@@ -296,7 +296,7 @@ void Lshal::dumpVintf() const {
                 continue;
             }
 
-            vintf::ManifestHal *hal = manifest.getHal(fqName.package());
+            vintf::ManifestHal *hal = manifest.getAnyHal(fqName.package());
             if (hal == nullptr) {
                 if (!manifest.add(vintf::ManifestHal{
                     .format = vintf::HalFormat::HIDL,
@@ -306,7 +306,7 @@ void Lshal::dumpVintf() const {
                     mErr << "Warning: cannot add hal '" << fqInstanceName << "'" << std::endl;
                     continue;
                 }
-                hal = manifest.getHal(fqName.package());
+                hal = manifest.getAnyHal(fqName.package());
             }
             if (hal == nullptr) {
                 mErr << "Warning: cannot get hal '" << fqInstanceName