diff options
| author | 2025-02-25 16:39:31 -0800 | |
|---|---|---|
| committer | 2025-02-25 16:39:31 -0800 | |
| commit | d2793b0142526f762012372e129276374cd45693 (patch) | |
| tree | 954207aa1a4833b4bafbdf91771f453d6c01d3c6 /tools/aapt2/ResourceParser.cpp | |
| parent | d3ec500f03bdc4badd3245337d066591d7b0f680 (diff) | |
| parent | f0e495d83f3b454ee6ec9fbf8368d4f9070a3877 (diff) | |
Merge "Only have featureFlag attr in xml when v>baklava" into main
Diffstat (limited to 'tools/aapt2/ResourceParser.cpp')
| -rw-r--r-- | tools/aapt2/ResourceParser.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp index fb576df248be..9e2a4c1b1cc2 100644 --- a/tools/aapt2/ResourceParser.cpp +++ b/tools/aapt2/ResourceParser.cpp @@ -547,7 +547,8 @@ bool ResourceParser::ParseResource(xml::XmlPullParser* parser,    });    std::string_view resource_type = parser->element_name(); -  if (auto flag = ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, "featureFlag"))) { +  if (auto flag = +          ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, xml::kAttrFeatureFlag))) {      if (options_.flag) {        diag_->Error(android::DiagMessage(source_.WithLine(parser->line_number()))                     << "Resource flag are not allowed both in the path and in the file"); @@ -1529,7 +1530,7 @@ bool ResourceParser::ParseStyleItem(xml::XmlPullParser* parser, Style* style) {    ResolvePackage(parser, &maybe_key.value());    maybe_key.value().SetSource(source); -  auto flag = ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, "featureFlag")); +  auto flag = ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, xml::kAttrFeatureFlag));    std::unique_ptr<Item> value = ParseXml(parser, 0, kAllowRawString);    if (!value) { @@ -1674,7 +1675,7 @@ bool ResourceParser::ParseArrayImpl(xml::XmlPullParser* parser,      const std::string& element_namespace = parser->element_namespace();      const std::string& element_name = parser->element_name();      if (element_namespace.empty() && element_name == "item") { -      auto flag = ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, "featureFlag")); +      auto flag = ParseFlag(xml::FindAttribute(parser, xml::kSchemaAndroid, xml::kAttrFeatureFlag));        std::unique_ptr<Item> item = ParseXml(parser, typeMask, kNoRawString);        if (!item) {          diag_->Error(android::DiagMessage(item_source) << "could not parse array item");  |