summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r--parse_xml.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 5900f27..7abbc55 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -513,7 +513,7 @@ struct MatrixHalConverter : public XmlNodeConverter<MatrixHal> {
513 } 513 }
514 } 514 }
515// Do not check for target-side libvintf to avoid restricting ability for upgrade accidentally. 515// Do not check for target-side libvintf to avoid restricting ability for upgrade accidentally.
516#ifdef LIBVINTF_HOST 516#ifndef LIBVINTF_TARGET
517 if (!checkAdditionalRestrictionsOnHal(*object)) { 517 if (!checkAdditionalRestrictionsOnHal(*object)) {
518 return false; 518 return false;
519 } 519 }
@@ -521,7 +521,7 @@ struct MatrixHalConverter : public XmlNodeConverter<MatrixHal> {
521 return true; 521 return true;
522 } 522 }
523 523
524#ifdef LIBVINTF_HOST 524#ifndef LIBVINTF_TARGET
525 private: 525 private:
526 bool checkAdditionalRestrictionsOnHal(const MatrixHal& hal) const { 526 bool checkAdditionalRestrictionsOnHal(const MatrixHal& hal) const {
527 if (hal.getName() == "netutils-wrapper") { 527 if (hal.getName() == "netutils-wrapper") {
@@ -650,7 +650,7 @@ struct ManifestHalConverter : public XmlNodeConverter<ManifestHal> {
650 return false; 650 return false;
651 } 651 }
652// Do not check for target-side libvintf to avoid restricting upgrade accidentally. 652// Do not check for target-side libvintf to avoid restricting upgrade accidentally.
653#ifdef LIBVINTF_HOST 653#ifndef LIBVINTF_TARGET
654 if (!checkAdditionalRestrictionsOnHal(*object)) { 654 if (!checkAdditionalRestrictionsOnHal(*object)) {
655 return false; 655 return false;
656 } 656 }
@@ -658,7 +658,7 @@ struct ManifestHalConverter : public XmlNodeConverter<ManifestHal> {
658 return true; 658 return true;
659 } 659 }
660 660
661#ifdef LIBVINTF_HOST 661#ifndef LIBVINTF_TARGET
662 private: 662 private:
663 bool checkAdditionalRestrictionsOnHal(const ManifestHal& hal) const { 663 bool checkAdditionalRestrictionsOnHal(const ManifestHal& hal) const {
664 if (hal.getName() == "netutils-wrapper") { 664 if (hal.getName() == "netutils-wrapper") {
@@ -866,6 +866,16 @@ struct HalManifestConverter : public XmlNodeConverter<HalManifest> {
866 return false; 866 return false;
867 } 867 }
868 868
869 std::set<std::string> vendorNdkVersions;
870 for (const auto& vendorNdk : object->framework.mVendorNdks) {
871 if (vendorNdkVersions.find(vendorNdk.version()) != vendorNdkVersions.end()) {
872 this->mLastError =
873 "Duplicated manifest.vendor-ndk.version " + vendorNdk.version();
874 return false;
875 }
876 vendorNdkVersions.insert(vendorNdk.version());
877 }
878
869 if (!parseOptionalChild(root, systemSdkConverter, {}, &object->framework.mSystemSdk)) { 879 if (!parseOptionalChild(root, systemSdkConverter, {}, &object->framework.mSystemSdk)) {
870 return false; 880 return false;
871 } 881 }