summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2017-04-28 16:37:56 -0500
committerYifan Hong2017-05-04 21:57:12 -0500
commit1e5a054a0c3790364428dbfbe8625836a3087776 (patch)
tree6a97c3ba3138667c8e48b80df5bb20c1f0282ec4 /parse_xml.cpp
parent0c5363ee04e16094c6725ed6db57a86e9e308c31 (diff)
downloadplatform-system-libvintf-1e5a054a0c3790364428dbfbe8625836a3087776.tar.gz
platform-system-libvintf-1e5a054a0c3790364428dbfbe8625836a3087776.tar.xz
platform-system-libvintf-1e5a054a0c3790364428dbfbe8625836a3087776.zip
Add device/fwk compatibility matrix to VintfObject.
For framework compatibility matrix, <sepolicy> sections is injected in build time. Test: libvintf_test Test: adb shell vintf; matrices exist, compatible = true Bug: 37321309 Bug: 36814503 Change-Id: I997b93456a261f0cdb85997ae88f4ac5a5f36ff3 Merged-In: I997b93456a261f0cdb85997ae88f4ac5a5f36ff3
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r--parse_xml.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 1502011..9f144f4 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -684,8 +684,10 @@ struct CompatibilityMatrixConverter : public XmlNodeConverter<CompatibilityMatri
684 } 684 }
685 685
686 if (object->mType == SchemaType::FRAMEWORK) { 686 if (object->mType == SchemaType::FRAMEWORK) {
687 // <avb> and <sepolicy> can be missing because it can be determined at build time, not
688 // hard-coded in the XML file.
687 if (!parseChildren(root, matrixKernelConverter, &object->framework.mKernels) || 689 if (!parseChildren(root, matrixKernelConverter, &object->framework.mKernels) ||
688 !parseChild(root, sepolicyConverter, &object->framework.mSepolicy) || 690 !parseOptionalChild(root, sepolicyConverter, {}, &object->framework.mSepolicy) ||
689 !parseOptionalChild(root, avbConverter, {}, &object->framework.mAvbMetaVersion)) { 691 !parseOptionalChild(root, avbConverter, {}, &object->framework.mAvbMetaVersion)) {
690 return false; 692 return false;
691 } 693 }