diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2018-11-06 16:39:36 -0800 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2018-12-04 16:45:26 -0800 |
commit | 75e20dda2b1ef3d2593b02f6a366a02656c1c89d (patch) | |
tree | 8fbbab15ed762cd27097f38e4db0279d679f14eb /tools/aapt2/format/binary/BinaryResourceParser.h | |
parent | 7208efc83baa70999d2ab264c289b0a38d716ed5 (diff) |
Encoding of <overlayable> and <policy>
This change defines two new chunks for encoding overlayable information.
RES_TABLE_OVERLAYABLE_POLICY_TYPE contains flags that represent
restrictions enforced on overlays that try to overlay a specific set of
resource ids. The chunk header is followed by ResTable_ref for each id
that belongs to the policy type. A policy chunk will be created for
every unique combination of policies that are defined in overlayable
declarations.
RES_TABLE_OVERLAYABLE_TYPE holds policy blocks. Since <overlayable>
does not currently have any attributes, only one overlayable block is
encoded in an APK.
This change also removes the SPEC_OVERLAYABLE flag because the runtime
does not use the flag, and the overlayable chunk encoding renders it
obsolete.
Bug: 110869880
Bug: 117545186
Test: libandroidfw_tests and aapt2_tests
Change-Id: I45ae9bf4176699f14c85e2b7a2e8560185d8a0b8
Diffstat (limited to 'tools/aapt2/format/binary/BinaryResourceParser.h')
-rw-r--r-- | tools/aapt2/format/binary/BinaryResourceParser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/aapt2/format/binary/BinaryResourceParser.h b/tools/aapt2/format/binary/BinaryResourceParser.h index 2bdc051f4e29..a2eee5006964 100644 --- a/tools/aapt2/format/binary/BinaryResourceParser.h +++ b/tools/aapt2/format/binary/BinaryResourceParser.h @@ -54,6 +54,7 @@ class BinaryResourceParser { 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); + bool ParseOverlayable(const android::ResChunk_header* chunk); std::unique_ptr<Item> ParseValue(const ResourceNameRef& name, const android::ConfigDescription& config, |