summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/binary/BinaryResourceParser.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2017-12-12 16:48:07 -0800
committerAdam Lesinski <adamlesinski@google.com>2017-12-18 14:16:02 -0800
commit71be70507de9cb619b644e55eda1cc181e3f7e90 (patch)
tree1ad3c588be3dd06b39b1ba5c3229f80ca08d62bd /tools/aapt2/format/binary/BinaryResourceParser.h
parent6bb6fad16d93a5859d47dcf962337c2719e585dd (diff)
AAPT2: Propagate SPEC_OVERLAYABLE flag to final APK
Resources can be marked as overlayable, which means they can be overlaid by runtime resource overlays. This change propagates this state to the final resource table that is installed on device. Future work: - Have the idmap tool respect the overlayable state and ignore entries that overlay anything else. Bug: 64980941 Test: make aapt2_tests Change-Id: Id45b1e141a281be2ee32a4ac3096fcf1114d523b
Diffstat (limited to 'tools/aapt2/format/binary/BinaryResourceParser.h')
-rw-r--r--tools/aapt2/format/binary/BinaryResourceParser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt2/format/binary/BinaryResourceParser.h b/tools/aapt2/format/binary/BinaryResourceParser.h
index 052f806e3b95..a1f9f83edfb6 100644
--- a/tools/aapt2/format/binary/BinaryResourceParser.h
+++ b/tools/aapt2/format/binary/BinaryResourceParser.h
@@ -50,7 +50,7 @@ class BinaryResourceParser {
bool ParseTable(const android::ResChunk_header* chunk);
bool ParsePackage(const android::ResChunk_header* chunk);
- bool ParseTypeSpec(const android::ResChunk_header* chunk);
+ bool ParseTypeSpec(const ResourceTablePackage* package, const android::ResChunk_header* chunk);
bool ParseType(const ResourceTablePackage* package, const android::ResChunk_header* chunk);
bool ParseLibrary(const android::ResChunk_header* chunk);
@@ -105,6 +105,9 @@ class BinaryResourceParser {
// A mapping of resource ID to resource name. When we finish parsing
// we use this to convert all resource IDs to symbolic references.
std::map<ResourceId, ResourceName> id_index_;
+
+ // A mapping of resource ID to type spec flags.
+ std::unordered_map<ResourceId, uint32_t> entry_type_spec_flags_;
};
} // namespace aapt