History log of /frameworks/base/tools/aapt2/cmd/Util.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
93e7dcb9d5ca913855a76282180f3c324fcfeefe 19-Oct-2017 Donald Chai <dchai@google.com> AAPT2: Sanitize resource qualifiers before using in split names.

Fixes: 67960909
Test: UtilTest.SplitNamesAreSanitized
Change-Id: I9ba1b8430a00cc7ce981075a60388f275c41dbea
(cherry picked from commit b8f078c9a0c9f32ad84c475c26299ecb00962ffa)
(cherry picked from commit 50bae79111afcdb8d36d73cac15155cb61df2dc0)
/frameworks/base/tools/aapt2/cmd/Util.cpp
5c33fb5408d6c02dc2c73f53d89d1494fe04f208 09-Aug-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Change XmlDom to exclude Namespace as a node

In preparation for exporting an XML proto format for UAM to consume,
this change brings the XML DOM API more in line with other APIs that
do not make the Namespace a separate node.

Treating Namespace declarations as just properties of an Element
node makes the implementation of algorithms much simpler, as
the constraints that Namespace nodes have only one child
are now built in and traversing to find Element nodes
is much simpler.

Also made a bunch of quality of life improvements, like formatting and
comment style.

Test: make aapt2_tests
Bug: 65645766
Change-Id: Ib97ff1c4252b7907e2cc1f13a448dc4ca3b809a4
Merged-In: Ib97ff1c4252b7907e2cc1f13a448dc4ca3b809a4
/frameworks/base/tools/aapt2/cmd/Util.cpp
55f2761fc8afdff01e75bce2718c222912a125f7 25-Jul-2017 Adam Lesinski <adamlesinski@google.com> 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
/frameworks/base/tools/aapt2/cmd/Util.cpp
c744ae8aca97edfb2422598ea620e8219449fa9b 18-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Implement attribute compat versioning

This change defines some hardcoded rules to degrade
attributes in newer SDKs to specific older attributes.

An attribute with a degrade rule will generate a new XML for the API
in which the attribute resulting from the degradation was introduced.

Since API 22 (Lollipop MR1), attributes are correctly ignored and do
not need to be versioned. In XML files defined for APIs 22+, the
original and degraded attributes coexist in the same XML file.

One such example is paddingHorizontal, introduced in API 26.
paddingHorizontal degrades to paddingLeft and paddingRight, which
were both introduced in API 1.

Bug: 35763493
Test: make aapt2_tests
Change-Id: I4aa8755a9ee2c0cc5afdc55c3d30093fd3a47f3d
/frameworks/base/tools/aapt2/cmd/Util.cpp
db091577fff5bcddac703bc8ac4f932fd53e0621 13-Apr-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow the ';' separator on Windows for split args

Bug: 36870463
Test: manual (wine)
Change-Id: I8a38545a3cac9354b41858e1840b197b60925c03
/frameworks/base/tools/aapt2/cmd/Util.cpp
d0f492db038c6210c1138865d816bfb134376538 04-Apr-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Share split functionality between link and optimize

Generating splits should be possible to do from the optimize command.
This means that a lot of infrastructure around split APKs can be
shared by both the optimize and link phase.

Bug: 35925830
Change-Id: Ia88b9e4bff300a56353b2f7a4a2547c8eb43a299
Test: manual
/frameworks/base/tools/aapt2/cmd/Util.cpp