History log of /frameworks/base/tools/aapt2/ResourceTable.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
66ea8400383d5737b996a136f3aead0965f7be3d 28-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Accept Java unicode identifiers

Test: make aapt2_tests
Change-Id: I75a0e52d43b1785001bfe120eea7484f7bb4682b
/frameworks/base/tools/aapt2/ResourceTable.cpp
4488f1c74a0f7df09f2b201f7caa228d729e8389 27-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix <add-resource> tag for overlays

Bug: 38355988
Test: make aapt2_tests
Change-Id: Iea8887f55f8ceb2c15bd963405fd132916173c0c
/frameworks/base/tools/aapt2/ResourceTable.cpp
b1afa07745280c7a36077beda6293b69c6ba4ea2 29-Mar-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow arbitrary entry names with aapt2 optimize

Presumably, the apps build fine for the developers, so just
feed the existing names through without validation. Validation
still exists when building an app from source.

Bug: 36051854
Change-Id: Idc64ee91b08dce67d3c28f3c5284a7afa1312df1
Test: run aapt2 optimize on the apks from b/36051854 and build aapt2_tests
/frameworks/base/tools/aapt2/ResourceTable.cpp
ceb9b2f80f853059233cdd29057f39a5960a74ae 16-Feb-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Shared library support

Test: make aapt2_tests
Change-Id: I98dddf1367e6c0ac425bb20be46e6ff05f4f2f45
/frameworks/base/tools/aapt2/ResourceTable.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/ResourceTable.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/ResourceTable.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/ResourceTable.cpp
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/ResourceTable.cpp
5c3464c75fc517c0306a4ffd39c59671ccfde544 25-Aug-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix merging of styleables the right way

Styleables should only be merged when processing overlays.
This moves the styleable merging code out of ResourceTable
and into TableMerger.

Change-Id: I3aae05cf4dd875cd25ac2ac744b61194409b2fee
/frameworks/base/tools/aapt2/ResourceTable.cpp
8197cc460e02c6445434eace435e3d38ebe475c6 19-Aug-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Merge Styleables instead of overriding them

Styleables merge in AAPT. Preserve this behavior.

Bug:30970091
Change-Id: Ie68ca675aeecd873c0648682182e2fc574e329a0
/frameworks/base/tools/aapt2/ResourceTable.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/ResourceTable.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/ResourceTable.cpp
458b877488c12ea4336d8fc00a95d9c0298bd6d0 25-Apr-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add diff command

Adds the diff command and various small fixes to issues
discovered when diffing old AAPT built APKs with new AAPT2
built APKS.

Bug:22775504
Change-Id: I682a7fe1cf4b3efa7cbd5d18b333cf2d1046fe1b
/frameworks/base/tools/aapt2/ResourceTable.cpp
355f285ffd000f6cfe76680eb22d010546d124bb 14-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Implement density stripping and initial Split support

When a preferred density is supplied, the closest matching densities
will be selected, the rest stripped from the APK.

Split support will be enabled in a later CL. Command line support is still
needed, but the foundation is ready.

Bug:25958912
Change-Id: I56d599806b4ec4ffa24e17aad48d47130ca05c08
/frameworks/base/tools/aapt2/ResourceTable.cpp
e4bb9eb5af5b0899dc0921d5580220b20e15bd5a 13-Feb-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Introduce notion of 'product' to ResourceTable

This allows us to preserve the various product definitions during the compile
phase, and allows us to select the product in the link phase.

This allows compiled files to remain product-independent, so that they do not need
to be recompiled when switching targets.

Bug:25958912
Change-Id: Iaa7eed25c834b67a39cdc9be43613e8b5ab6cdd7
/frameworks/base/tools/aapt2/ResourceTable.cpp
a6fe345be955368a13aea76aefb4db821aad11df 10-Dec-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix overlay support

Supports the <add-resource> tag and mimics old AAPT behavior of
not allowing new resources defined unless <add-resource> was used
or --auto-add-overlay was specified.

Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4
/frameworks/base/tools/aapt2/ResourceTable.cpp
fb48d292d9eb78a73f9473d90911ecb81da5fffd 08-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Add support for overlays when merging resources

Change-Id: Iea9e41123cf89e3cfba7eb6bea89def56dee8093
/frameworks/base/tools/aapt2/ResourceTable.cpp
b274e35abfbbd09e0fce983a215c11522c56cce2 07-Nov-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix inclusion of comments in R.java javadoc

Comments weren't being copied when merged from the various
resource tables.

Also refactored the JavaClassGenerator to omit a class
if no entries exist for it.

Change-Id: I6eaa89b7b3715bc05403635a2baf0d1db3efd142
/frameworks/base/tools/aapt2/ResourceTable.cpp
e78fd617ec60139a973a01925fa7adad31febb39 22-Oct-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Move comments and source into Value

Values are closely related to where they were defined, so
this information should live inside the Value.

This also enables comments to be attached to nested Values.

Change-Id: Ic7481b5a5f26d0ef248d638e2e29252f88154581
/frameworks/base/tools/aapt2/ResourceTable.cpp
9e10ac70155c993e7053323ad36beaea7bf7d54f 16-Oct-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Process <java-symbols> and private symbol package

Need to introduce the idea of multiple levels of visibility to support <java-symbol>.

Public, Private, Undefined.

Public means it is accessible from outside and requires an ID assigned.
Private means that we explicitly want this to be a symbol (show up in R.java), but not visible
to other packages. No ID required.

Undefined is any normal resource. When --private-symbols is specified in the link phase,
these resources will not show up in R.java.

Change-Id: Icba89221e08e685dee7683786aa7112baf28c856
/frameworks/base/tools/aapt2/ResourceTable.cpp
9ba47d813075fcb05c5e1532c137c93b394631cb 13-Oct-2015 Adam Lesinski <adamlesinski@google.com> Filter products during compile phase

Unfortunately there is no good way to deal with products in the link phase.
Products are like preprocessor defines in that they are processed early
and change the composition of the compiled unit.

Change-Id: I6d5e15ef60d29df8e83e059ba857c09333993779
/frameworks/base/tools/aapt2/ResourceTable.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/ResourceTable.cpp
330edcdf1316ed599fe0eb16a64330821fd92f18 05-May-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Support static lib referencing static lib

When a static library A references static library B,
and app C references both A and B, we get the following symbol merging,
symbols from library B get imported twice.

We must only check that symbol references to library B are valid
when building library A. We should only merge all the symbols
when building final app C.

Change-Id: I23cba33b0901dcbb5328d9c9dfaa6a979c073c36
/frameworks/base/tools/aapt2/ResourceTable.cpp
6ff19664f9279023c96e5a65c3059e1ef4beac0f 01-May-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Record public status in a more robust way

This allows us to store the source and comments of a resource's
public declaration and avoids issues where there is no default
configuration for a publicly declared resource (like with drawables
of various densities) and AAPT2 mistakenly took this as an error.

Change-Id: I07a2fe9f551daefcce842f205fb219d2fa453ebc
/frameworks/base/tools/aapt2/ResourceTable.cpp
24aad163bc88cb10d2275385e9afc3de7f342d65 25-Apr-2015 Adam Lesinski <adamlesinski@google.com> Add namespace handling in attribute values

Previously, you could only reference namespace prefixes in attribute names:

<View xmlns:appcompat="http://schemas.android.com/apk/res/android.support.v7.appcompat"
appcompat:name="hey"
...

Now you can also reference them in resource names within an attribute value:

...
android:text="@appcompat:string/confirm"
...

Which will be treated as "@android.support.v7.appcompat:string/confirm".

Change-Id: Ib076e867a990c80cf877a704eb77cd1ef0b23b52
/frameworks/base/tools/aapt2/ResourceTable.cpp
769de98f2dd41bfe39a1c9f76aefd1ad58942733 11-Apr-2015 Adam Lesinski <adamlesinski@google.com> AAPT2: Add library support

Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
/frameworks/base/tools/aapt2/ResourceTable.cpp
ca2fc353c2b07e24e297fdc8426c7abd601d908b 03-Apr-2015 Adam Lesinski <adamlesinski@google.com> Fix windows build of AAPT2

Change-Id: Ib8e1a4322510b582e9600a08d3118842c9abc73c
/frameworks/base/tools/aapt2/ResourceTable.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/ResourceTable.cpp