summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/binary/BinaryResourceParser.cpp
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2021-04-08 04:27:11 +0000
committerScott Lobdell <slobdell@google.com>2021-04-09 17:32:37 +0000
commit5f1da148b08c14445ce83ca151a84f75e489d274 (patch)
treedf59b2056d1fe2dbe09f6c85463ddf1769daf4e6 /tools/aapt2/format/binary/BinaryResourceParser.cpp
parent702f04add003ce3e490a2f0bdff083a7e6f5979e (diff)
parent851218af5f83cdb89c02d680fb22212318150068 (diff)
Merge SP1A.210407.002
Change-Id: Iaad2b7cc2aeba166f003d0d460bc8ce29d1caab3
Diffstat (limited to 'tools/aapt2/format/binary/BinaryResourceParser.cpp')
-rw-r--r--tools/aapt2/format/binary/BinaryResourceParser.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/aapt2/format/binary/BinaryResourceParser.cpp b/tools/aapt2/format/binary/BinaryResourceParser.cpp
index bfb8d5854d6d..f1b350fe90f7 100644
--- a/tools/aapt2/format/binary/BinaryResourceParser.cpp
+++ b/tools/aapt2/format/binary/BinaryResourceParser.cpp
@@ -393,8 +393,15 @@ bool BinaryResourceParser::ParseType(const ResourceTablePackage* package,
.SetAllowMangled(true);
if (entry->flags & ResTable_entry::FLAG_PUBLIC) {
- res_builder.SetVisibility(Visibility{Visibility::Level::kPublic});
+ Visibility visibility{Visibility::Level::kPublic};
+ auto spec_flags = entry_type_spec_flags_.find(res_id);
+ if (spec_flags != entry_type_spec_flags_.end() &&
+ spec_flags->second & ResTable_typeSpec::SPEC_STAGED_API) {
+ visibility.staged_api = true;
+ }
+
+ res_builder.SetVisibility(visibility);
// Erase the ID from the map once processed, so that we don't mark the same symbol more than
// once.
entry_type_spec_flags_.erase(res_id);