summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2018-01-17 18:09:46 -0600
committerYifan Hong2018-01-18 13:36:25 -0600
commit68d2306e19e1d8b2c7d1ba0e6bc0466e87c7ef0f (patch)
tree50e629f9cf3805702c6c78338c2b49a605a40920 /parse_xml.cpp
parentd52bf3e64c1d88b0474c3915ec23a397cdd6b9f0 (diff)
downloadplatform-system-libvintf-68d2306e19e1d8b2c7d1ba0e6bc0466e87c7ef0f.tar.gz
platform-system-libvintf-68d2306e19e1d8b2c7d1ba0e6bc0466e87c7ef0f.tar.xz
platform-system-libvintf-68d2306e19e1d8b2c7d1ba0e6bc0466e87c7ef0f.zip
ManifestHal: add "override" attribute
"override" is a boolean attribute on <hal> tags that suggest the <hal> tag can override any existing <hal> tags, even if there is a major version conflict. Test: libvintf_test Bug: 69051162 Change-Id: I388dc15b9e45170b6c9778f4e7efc8fd27869892
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r--parse_xml.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 9a09eae..62ba763 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -596,10 +596,14 @@ struct ManifestHalConverter : public XmlNodeConverter<ManifestHal> {
596 appendChild(root, transportArchConverter(hal.transportArch, d)); 596 appendChild(root, transportArchConverter(hal.transportArch, d));
597 appendChildren(root, versionConverter, hal.versions, d); 597 appendChildren(root, versionConverter, hal.versions, d);
598 appendChildren(root, halInterfaceConverter, iterateValues(hal.interfaces), d); 598 appendChildren(root, halInterfaceConverter, iterateValues(hal.interfaces), d);
599 if (hal.isOverride) {
600 appendAttr(root, "override", hal.isOverride);
601 }
599 } 602 }
600 bool buildObject(ManifestHal *object, NodeType *root) const override { 603 bool buildObject(ManifestHal *object, NodeType *root) const override {
601 std::vector<HalInterface> interfaces; 604 std::vector<HalInterface> interfaces;
602 if (!parseOptionalAttr(root, "format", HalFormat::HIDL, &object->format) || 605 if (!parseOptionalAttr(root, "format", HalFormat::HIDL, &object->format) ||
606 !parseOptionalAttr(root, "override", false, &object->isOverride) ||
603 !parseTextElement(root, "name", &object->name) || 607 !parseTextElement(root, "name", &object->name) ||
604 !parseOptionalChild(root, transportArchConverter, {}, &object->transportArch) || 608 !parseOptionalChild(root, transportArchConverter, {}, &object->transportArch) ||
605 !parseChildren(root, versionConverter, &object->versions) || 609 !parseChildren(root, versionConverter, &object->versions) ||