History log of /frameworks/base/tools/aapt2/SdkConstants.cpp
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/SdkConstants.cpp
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/SdkConstants.cpp
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/SdkConstants.cpp
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/SdkConstants.cpp
9b8528fee4eed35b8e887ded0851d08eb2b10db6 10-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in aapt and aapt2.

* Add explicit keyword to conversion constructors.
* Add NOLINT(implicit) comments for implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: Id6d21961f313a1ad92b15a37fdaa5be9e8ab48e1
/frameworks/base/tools/aapt2/SdkConstants.cpp
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/SdkConstants.cpp
fb6312fe93a8544e6a95d1c619c8cea3940cbe1a 28-Jun-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add version collapsing

When an app specifies (or imports) resources with various
configurations for different SDK versions, specifying
a minSdk will make many of those resources unreachable.

Version collapsing will prune out the resources specified
for SDK versions less than the minSdk.

If, however, there is no exact matching resource for the
minSdk version, the next smallest SDK version is kept.

Change-Id: Ic7bcab6c59d65c97c67c8767358abb57cdec60a4
/frameworks/base/tools/aapt2/SdkConstants.cpp
1ab598f46c3ff520a67f9d80194847741f3467ab 14-Aug-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Separate out the various steps

An early refactor. Some ideas became clearer as
development continued. Now the various phases are much
clearer and more easily reusable.

Also added a ton of tests!

Change-Id: Ic8f0a70c8222370352e63533b329c40457c0903e
/frameworks/base/tools/aapt2/SdkConstants.cpp
75f3a55cc569a9b61f540a85d9828e91bdca5047 03-Jun-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Change xml file parsing to DOM based

We modify the XML of layouts and AndroidManifest enough
that it warrants we operate on the tree in memory.
These files are never very large so this should be fine.

Change-Id: I5d597abdb3fca2a203cf7c0b40fcd926aecb3137
/frameworks/base/tools/aapt2/SdkConstants.cpp
6f6ceb7e1456698b1f33e04536bfb3227f9fcfcb 14-Nov-2014 Adam Lesinski <adamlesinski@google.com> AAPT2

First checking of AAPT2. The individual phases of AAPT2 work, but there
are some missing pieces.

For early testing we are missing:
- Need to properly mark file references and include them in package
- Need to package into zip

Final AAPT for apps we are missing:
- Need to crush PNGs
- Need to parse 9-patches
- Need to validate all of AndroidManifest.xml
- Need to write align method to align resource tables for splits.

Final AAPT for apps + system we are missing:
- Need to handle overlays
- Need to store comments for R file
- Need to handle --shared-lib (dynamic references too).

New AAPT features coming:
- Need to import compiled libraries
- Name mangling
- R file generation for library code

Change-Id: I95f8a63581b81a1f424ae6fb2c373c883b72c18d
/frameworks/base/tools/aapt2/SdkConstants.cpp