History log of /frameworks/base/tools/aapt2/xml/XmlDom.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/xml/XmlDom.h
ea134e08d70d156bdd17714d5f9ab9c44c91d4fa 13-Apr-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix order-of-destruction crash

Make sure that users of StringPool are destroyed before
the StringPool itself.

Test: valgrind aapt2 optimize -o opt.apk out/target/common/obj/APPS/framework-res_intermediates/package-export.apk
Change-Id: I140c2d32f8449028976795d5d6865d83e1409b53
/frameworks/base/tools/aapt2/xml/XmlDom.h
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/xml/XmlDom.h
d5083f6f6b9bc76bbe64052bcec639eee752a321 17-Jan-2017 Adam Lesinski <adamlesinski@google.com> Move StringPiece to libandroidfw

libandroidfw needs to make use of StringPiece, so
move it to libandroidfw and update all code referencing
StringPiece in aapt2.

Test: make libandroidfw_tests libaapt2_tests
Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
/frameworks/base/tools/aapt2/xml/XmlDom.h
e343eb145c42d00c4fd3fdde93cd0be55cb5b855 28-Oct-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Insert <uses-sdk> element before <application>

PackageParser on the device uses the targetSdkVersion of the
app while it parses <application>. That means that if the
<uses-sdk> tag comes after <application>, the targetSdkVersion
is assumed to be 0.

Test: make libaapt2_tests
Change-Id: I60f2179a7ff44e7419217afb53f3d24f8c030f6e
/frameworks/base/tools/aapt2/xml/XmlDom.h
ce5e56e243d262a9b65459c3bd0bb9eaadd40628 22-Oct-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Rename to match new style

Use Google3 naming style to match new
projects' and open source google projects' style.

Preferred to do this in a massive CL so as to avoid
style inconsistencies that plague legacy code bases.
This is a relatively NEW code base, may as well keep
it up to date.

Test: name/style refactor - existing tests pass
Change-Id: Ie80ecb78d46ec53efdfca2336bb57d96cbb7fb87
/frameworks/base/tools/aapt2/xml/XmlDom.h
cacb28f2d60858106e2819cc7d95a65e8bda890b 19-Oct-2016 Adam Lesinski <adamlesinski@google.com> Use Google3 style guide with .clang-format

Test: style change only, builds ok
Change-Id: I885180e24cb2e7b58cfb4967c3bcb40058ce4078
/frameworks/base/tools/aapt2/xml/XmlDom.h
5eeaaddffd23d8d85aeb321e3ceea626e42cf9de 25-Aug-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add Inline Complex XML support

See: https://developer.android.com/guide/topics/resources/complex-xml-resources.html

Change-Id: I8274c85e25cabf90423141c228697e873167d136
/frameworks/base/tools/aapt2/xml/XmlDom.h
d0f116b619feede0cfdb647157ce5ab4d50a1c46 09-Jul-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Remove usage of u16string

For legacy reasons, we kept around the use of UTF-16 internally
in AAPT2. We don't need this and this CL removes all instances of
std::u16string and StringPiece16. The only places still needed
are when interacting with the ResTable APIs that only operate in
UTF16.

Change-Id: I492475b84bb9014fa13bf992cff447ee7a5fe588
/frameworks/base/tools/aapt2/xml/XmlDom.h
64587af8179affd38ee26543b748f2d63b7f67bb 19-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support building, linking, and merging static libraries

Android static libraries are like APKs but they contain much more debugging
and source information. We need to treat them differently in 3 ways:

1) When building a static library, we skip things like ID assignment and
product/config stripping. Source information is emitted as well.
2) When building a static library and linking against another
static library, we don't want to merge, we want to simply reference.
3) When building an app that uses static libraries, we want to merge
the static library under the same package with or without mangling.

Bug:25958912
Change-Id: I425e032857936a3e83173c1edc2a6cdc6020b842
/frameworks/base/tools/aapt2/xml/XmlDom.h
467f171315f9c2037fcd3eb5edcfabc40671bf7b 17-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fail compiling when private symbols are referenced

Also moved some XML specific stuff into its own directory,
and refactored ReferenceLinker a bit.

Change-Id: I912247a82023c1bbf72dc191fbdaf62858cbec0c
/frameworks/base/tools/aapt2/xml/XmlDom.h