Add hal.updatable-via-apex attribute

Updatable hals should declare which APEX will update it in the manifest.

  <hal updatable-via-apex="com.android.foo"> .. </hal>

This is checked by vts_treble_vintf_vendor_test to allow newer versions
of updatable HALs.

Bug: 130058564
Bug: 175082690
Test: atest libvintf_test (Parsing/Unparsing new attribute)
Test: atest vts_treble_vintf_vendor_test
Change-Id: I3d393b589eb7004e2025e237e175e7574dd7f808
diff --git a/ManifestHal.cpp b/ManifestHal.cpp
index 6bc86d3..5cee28a 100644
--- a/ManifestHal.cpp
+++ b/ManifestHal.cpp
@@ -80,6 +80,7 @@
     if (!(transportArch == other.transportArch)) return false;
     if (interfaces != other.interfaces) return false;
     if (isOverride() != other.isOverride()) return false;
+    if (updatableViaApex() != other.updatableViaApex()) return false;
     if (mAdditionalInstances != other.mAdditionalInstances) return false;
     return true;
 }
@@ -93,7 +94,7 @@
                 FqInstance fqInstance;
                 if (fqInstance.setTo(getName(), v.majorVer, v.minorVer, interface, instance)) {
                     if (!func(ManifestInstance(std::move(fqInstance), TransportArch{transportArch},
-                                               format))) {
+                                               format, updatableViaApex()))) {
                         return false;
                     }
                 }
@@ -202,7 +203,8 @@
         return false;
     }
 
-    mAdditionalInstances.emplace(std::move(toAdd), this->transportArch, this->format);
+    mAdditionalInstances.emplace(std::move(toAdd), this->transportArch, this->format,
+                                 this->updatableViaApex());
     return true;
 }