summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2018-01-10 16:51:59 -0600
committerYifan Hong2018-01-12 14:37:00 -0600
commit0f529fab7c41b36014b90813e646b9f4a6bfc59b (patch)
tree0cfabbe49f07d555ac1114af2abc04856e6e0674 /parse_xml.cpp
parent47f1045ec7651e8b3bf56cd2d3bac221ca14671a (diff)
downloadplatform-system-libvintf-0f529fab7c41b36014b90813e646b9f4a6bfc59b.tar.gz
platform-system-libvintf-0f529fab7c41b36014b90813e646b9f4a6bfc59b.tar.xz
platform-system-libvintf-0f529fab7c41b36014b90813e646b9f4a6bfc59b.zip
Mark Vndk / VndkVersionRange as deprecated.
<vndk> tag becomes deprecated and should not be used. <vendor-ndk> is used to replace it instead. Test: builds Bug: 36400653 Change-Id: Ibeaa6c366fd78f3d4b0f06c13d8a33b71f4be1cf
Diffstat (limited to 'parse_xml.cpp')
-rw-r--r--parse_xml.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/parse_xml.cpp b/parse_xml.cpp
index 1723bd0..3e16b80 100644
--- a/parse_xml.cpp
+++ b/parse_xml.cpp
@@ -696,10 +696,11 @@ struct SepolicyConverter : public XmlNodeConverter<Sepolicy> {
696}; 696};
697const SepolicyConverter sepolicyConverter{}; 697const SepolicyConverter sepolicyConverter{};
698 698
699[[deprecated]]
699const XmlTextConverter<VndkVersionRange> vndkVersionRangeConverter{"version"}; 700const XmlTextConverter<VndkVersionRange> vndkVersionRangeConverter{"version"};
700const XmlTextConverter<std::string> vndkLibraryConverter{"library"}; 701const XmlTextConverter<std::string> vndkLibraryConverter{"library"};
701 702
702struct VndkConverter : public XmlNodeConverter<Vndk> { 703struct [[deprecated]] VndkConverter : public XmlNodeConverter<Vndk> {
703 std::string elementName() const override { return "vndk"; } 704 std::string elementName() const override { return "vndk"; }
704 void mutateNode(const Vndk &object, NodeType *root, DocType *d) const override { 705 void mutateNode(const Vndk &object, NodeType *root, DocType *d) const override {
705 appendChild(root, vndkVersionRangeConverter(object.mVersionRange, d)); 706 appendChild(root, vndkVersionRangeConverter(object.mVersionRange, d));
@@ -714,6 +715,7 @@ struct VndkConverter : public XmlNodeConverter<Vndk> {
714 } 715 }
715}; 716};
716 717
718[[deprecated]]
717const VndkConverter vndkConverter{}; 719const VndkConverter vndkConverter{};
718 720
719struct HalManifestSepolicyConverter : public XmlNodeConverter<Version> { 721struct HalManifestSepolicyConverter : public XmlNodeConverter<Version> {
@@ -769,7 +771,10 @@ struct HalManifestConverter : public XmlNodeConverter<HalManifest> {
769 } 771 }
770 } else if (m.mType == SchemaType::FRAMEWORK) { 772 } else if (m.mType == SchemaType::FRAMEWORK) {
771 if (!(flags & SerializeFlag::NO_VNDK)) { 773 if (!(flags & SerializeFlag::NO_VNDK)) {
774#pragma clang diagnostic push
775#pragma clang diagnostic ignored "-Wdeprecated-declarations"
772 appendChildren(root, vndkConverter, m.framework.mVndks, d); 776 appendChildren(root, vndkConverter, m.framework.mVndks, d);
777#pragma clang diagnostic pop
773 } 778 }
774 } 779 }
775 780
@@ -799,6 +804,8 @@ struct HalManifestConverter : public XmlNodeConverter<HalManifest> {
799 return false; 804 return false;
800 } 805 }
801 } else if (object->mType == SchemaType::FRAMEWORK) { 806 } else if (object->mType == SchemaType::FRAMEWORK) {
807#pragma clang diagnostic push
808#pragma clang diagnostic ignored "-Wdeprecated-declarations"
802 if (!parseChildren(root, vndkConverter, &object->framework.mVndks)) { 809 if (!parseChildren(root, vndkConverter, &object->framework.mVndks)) {
803 return false; 810 return false;
804 } 811 }
@@ -809,6 +816,7 @@ struct HalManifestConverter : public XmlNodeConverter<HalManifest> {
809 return false; 816 return false;
810 } 817 }
811 } 818 }
819#pragma clang diagnostic pop
812 } 820 }
813 for (auto &&hal : hals) { 821 for (auto &&hal : hals) {
814 std::string description{hal.name}; 822 std::string description{hal.name};
@@ -901,9 +909,12 @@ struct CompatibilityMatrixConverter : public XmlNodeConverter<CompatibilityMatri
901 } 909 }
902 } else if (m.mType == SchemaType::DEVICE) { 910 } else if (m.mType == SchemaType::DEVICE) {
903 if (!(flags & SerializeFlag::NO_VNDK)) { 911 if (!(flags & SerializeFlag::NO_VNDK)) {
912#pragma clang diagnostic push
913#pragma clang diagnostic ignored "-Wdeprecated-declarations"
904 if (!(m.device.mVndk == Vndk{})) { 914 if (!(m.device.mVndk == Vndk{})) {
905 appendChild(root, vndkConverter(m.device.mVndk, d)); 915 appendChild(root, vndkConverter(m.device.mVndk, d));
906 } 916 }
917#pragma clang diagnostic pop
907 } 918 }
908 } 919 }
909 920
@@ -946,9 +957,12 @@ struct CompatibilityMatrixConverter : public XmlNodeConverter<CompatibilityMatri
946 } else if (object->mType == SchemaType::DEVICE) { 957 } else if (object->mType == SchemaType::DEVICE) {
947 // <vndk> can be missing because it can be determined at build time, not hard-coded 958 // <vndk> can be missing because it can be determined at build time, not hard-coded
948 // in the XML file. 959 // in the XML file.
960#pragma clang diagnostic push
961#pragma clang diagnostic ignored "-Wdeprecated-declarations"
949 if (!parseOptionalChild(root, vndkConverter, {}, &object->device.mVndk)) { 962 if (!parseOptionalChild(root, vndkConverter, {}, &object->device.mVndk)) {
950 return false; 963 return false;
951 } 964 }
965#pragma clang diagnostic pop
952 } 966 }
953 967
954 if (!kMetaVersion.minorAtLeast(version)) { 968 if (!kMetaVersion.minorAtLeast(version)) {