diff options
Diffstat (limited to 'tools/aapt2/ResourceParser.cpp')
-rw-r--r-- | tools/aapt2/ResourceParser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp index 2df941834063..45bf8e38c5ce 100644 --- a/tools/aapt2/ResourceParser.cpp +++ b/tools/aapt2/ResourceParser.cpp @@ -690,7 +690,9 @@ bool ResourceParser::ParseResource(xml::XmlPullParser* parser, resource_format = item_iter->second.format; } - if (!ParseItem(parser, out_resource, resource_format)) { + // Don't bother parsing the item if it is behind a disabled flag + if (out_resource->flag_status != FlagStatus::Disabled && + !ParseItem(parser, out_resource, resource_format)) { return false; } return true; |