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
This commit is contained in:
Adam Lesinski
2017-12-12 16:48:07 -08:00
parent 6bb6fad16d
commit 71be70507d
31 changed files with 813 additions and 460 deletions

View File

@@ -139,8 +139,8 @@ TEST(JavaClassGeneratorTest, OnlyWritePublicResources) {
.AddSimple("android:id/one", ResourceId(0x01020000))
.AddSimple("android:id/two", ResourceId(0x01020001))
.AddSimple("android:id/three", ResourceId(0x01020002))
.SetSymbolState("android:id/one", ResourceId(0x01020000), SymbolState::kPublic)
.SetSymbolState("android:id/two", ResourceId(0x01020001), SymbolState::kPrivate)
.SetSymbolState("android:id/one", ResourceId(0x01020000), Visibility::Level::kPublic)
.SetSymbolState("android:id/two", ResourceId(0x01020001), Visibility::Level::kPrivate)
.Build();
std::unique_ptr<IAaptContext> context =