OSDN Git Service

AAPT2: Add targetConfig to AndroidManifest.xml
authorAdam Lesinski <adamlesinski@google.com>
Tue, 25 Jul 2017 00:08:32 +0000 (17:08 -0700)
committerAdam Lesinski <adamlesinski@google.com>
Sat, 5 Aug 2017 00:32:32 +0000 (17:32 -0700)
commit55f2761fc8afdff01e75bce2718c222912a125f7
tree8bb631c264578d8998da6453b32db894c3338e2c
parent5b6ee115489ce93dafce57d7f5ac33564cd6ef52
AAPT2: Add targetConfig to AndroidManifest.xml

Splits may include more/different configurations than they
were originally specified to include. This happens, for instance,
when a particular requested density doesn't exist. A fallback density
resource is chosen for the split.

This makes programmatic configuration targetting difficult, as the APK
may report that it has resources for multiple densities, while it was
meant to target only a specific density.

This change encodes a comma separated list of the intended configurations
for the split in an attribute called 'targetConfig' on the <manifest> tag of
AndroidManifest.xml.

Test: manual
Change-Id: I3167e9341a434abc34ed2ddb8f740762b40b1ab7
tools/aapt2/cmd/Util.cpp