• Home
  • History
  • Annotate
  • only in /frameworks/base/tools/aapt2/integration-tests/
History log of /frameworks/base/tools/aapt2/integration-tests/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ee0e486d3617bdc31ae6e42414bbf2316dee164c 26-Jul-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Add navigation type

Test: build succeeds
Bug: 65645766
Change-Id: I7d49366c7cc4a93c29bad4cb9f13eec23ad05bd2
Merged-In: I7d49366c7cc4a93c29bad4cb9f13eec23ad05bd2
ppOne/res/navigation/home.xml
bb94f32a0042c8e2ab3d6e0de1b693713d2a6eab 12-Jul-2017 Adam Lesinski <adamlesinski@google.com> Revert "AAPT2: Auto-version adaptive-icon XML"

This reverts commit 5b7337f77cf036dda2c7218ccf22dedc774dcf76.

Bug: 63579299
Test: none
Change-Id: Ib617c4edfc16eeae3507b59b2debeae4f8bbf9a5
ppOne/res/drawable/adaptive-icon.xml
5b7337f77cf036dda2c7218ccf22dedc774dcf76 26-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Auto-version adaptive-icon XML

Auto version adaptive-icon XML to v26.

This change makes the logic for generating versioned resources
simpler by changing the comparison function of ResTable_config
to evaluate the sdkVersion property last, making configurations
that differ only in sdkVersion next to each other in a sorted vector.

Bug: 62316340
Test: manual (verified output of tools/aapt2/integration-tests/AppOne)
Change-Id: I977d45821722a65d2135efb4693304eacc565c9a
ppOne/res/drawable/adaptive-icon.xml
3124e7ca0f582c8d54a9b4cf560c25dfef77ac2a 14-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Fix issue with enums and integer attributes

When an attribute had the format "enum|integer", and a max or min
allowed value set, any value set for this attribute would have its
enum symbol's value checked against the valid integer range.

This would lead to the following:

android:numColumns="autofit"

being interpreted as an integer value of -1, which violated the minimum
expected value for numColumns, which was 0.

Bug: 62358540
Test: make aapt2_tests
Change-Id: I3150410448a533d3595a08ac6b2966264db874d8
ppOne/res/values/styles.xml
7a917a27ef1dae63e7747c9d00b4ff71b1a502e2 02-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow <layout> in <activity> tag in AndroidManifest.xml

Bug: 62189611
Test: make AaptTestAppOne
Change-Id: Ic090e4a002b24f2289f47dfba7439638e5848062
ppOne/AndroidManifest.xml
bab4ef56d7803f3a50ccfaca2729509338fcbb23 02-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow undefined resources (placeholders)

A resource defined like so:

<item type="drawable" name="foo" />

should be assigned the value @null.

The only exception is for <string> resources, which are given the
empty string value (since <string></string> is ambiguous). The decision
to use "" is based off the fact that old AAPT used to assign "" to all
undefined resources, even non-string ones.

Bug: 38425050
Test: make aapt2_tests
Change-Id: Ib3e0f6f83d16ddd8b279c9fd44a07a37867b85e9
ppOne/res/values/test.xml
e597d68d33c76c2b830f5497ed4ba74c5193a056 02-Jun-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow any value type for <item> without format attr

TO bring AAPT2 behavior in-line with AAPT, <item> has a default
format of "any", and only becomes restricted with an explicit format
attribute.

Bug: 62260121
Test: make aapt2_tests
Change-Id: Ife416f520e6c2710bb30e3ba3f2d4463794bfa06
ppOne/res/values/test.xml
2354b568379fe31ba4e774f7a92d4c685a60a2ab 27-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Follow symlinks when compiling

Bug: 62144459
Test: make AaptSymlinkTest
Change-Id: Idb3ab1ece17c52bb4fd174ec4c08a9e173289e55
ymlinkTest/Android.mk
ymlinkTest/AndroidManifest.xml
ymlinkTest/targets/layout.xml
ymlinkTest/targets/values.xml
ymlinkTest/targets/white_3x3.9.png
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
utoVersionTest/Android.mk
utoVersionTest/AndroidManifest.xml
utoVersionTest/res/layout-v21/layout3.xml
utoVersionTest/res/layout/layout.xml
utoVersionTest/res/layout/layout2.xml
utoVersionTest/res/layout/layout3.xml
utoVersionTest/res/values-v21/styles.xml
utoVersionTest/res/values/styles.xml
4b585db64f1dda5c343855e63d7d4b6fc0c6d729 13-May-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Allow <uses-permission-sdk-23> in manifest

Bug: 38269610
Test: build tools/aapt2/integration-tests/AppOne
Change-Id: I1d0b87aa36f6bf82aab146339acf8848166b218d
ppOne/AndroidManifest.xml
b39ad7c9f66877f92ea8583aa8b7b5a8daa6031e 13-Mar-2017 Adam Lesinski <adamlesinski@google.com> AAPT2: Add -A (assets) support

Looks like the build system doesn't support assets/ for
resources, so we will re-introduce them in aapt2, even though
we're just copying them around and they would be better
suited for inclusion in the APK when classes.dex gets inserted.

Bug: 35461578
Test: CTS test android.content.res.cts.AssetManager#testAssetOperations should pass
Change-Id: I18361d7367d476806bcf7154ee76df3f0e83b565
ppOne/Android.mk
ppOne/assets/subdir/subsubdir/test.txt
ppOne/assets/test.txt
ppOne/assets2/new.txt
ppOne/assets2/test.txt
4d35cca96ce55eb29d1948086214f91ae94e9adb 18-Jan-2017 Yuichi Araki <yaraki@google.com> AAPT: Add --no-version-transitions flag

Add a new flag to disable versioning of Transition related XMLs.
Transition support library will use this to handle these XMLs on older
API levels.

Test: make libaapt_tests AaptTestAppOne
Bug: 34427868
Change-Id: I66e81cca049e71ef6704177b2ca21c9cdeaff78f
ppOne/Android.mk
ppOne/res/transition/transition_set.xml
c0c366394c658e3787b12e65833b520c9a9a34d9 20-Oct-2016 Adam Lesinski <adamlesinski@google.com> Add font type to AAPT2

Test: make libaapt2_tests AaptTestAppOne
Change-Id: I8fbf01675a218cc3c0b59598b6b1ec173851e946
ppOne/res/font/myfont-italic.ttf
ppOne/res/font/myfont-normal.ttf
ppOne/res/font/myfont.xml
21efb6827cede06c2ab708de6cdb64d052dddcce 15-Sep-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Refactor PngCrunching

PngCrunching now has a slightly better heuristic of choosing to encode
an image as a palette or RGB. For small images, RGB compresses much better
than a palette.

The original PNG is used as-is (minus some optional chunks being stripped)
if the resulting crunched PNG is larger than the original.

9-patch handling is abstracted away from PNGs, paving the way
for other 9-patches, like WebP.

TODO: handle PNGs with 9-patch chunks already present, which
should just be passed through. This will allow for 3rd party
tools to generate 9-patches.

TODO: implement cheap transparency: when one color is used to represent
transparent, and all other colors are opaque.

Bug:30053276
Change-Id: I5167f53b91d1efa462d9f03d6b9108d9b541c0c1
ppOne/res/drawable/cheap_transparency.png
ppOne/res/drawable/complex.9.png
ppOne/res/drawable/outline_8x8.9.png
ppOne/res/drawable/round_rect_off_center_outline_32x16.9.png
ppOne/res/drawable/round_rect_outline_32x16.9.png
ppOne/res/drawable/transparent_3x3.9.png
ppOne/res/drawable/transparent_optical_bounds_3x3.9.png
ppOne/res/drawable/white_3x3.9.png
ppOne/res/drawable/white_optical_bounds_3x3.9.png
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
ppOne/res/layout/special.xml
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
ppOne/res/values/test.xml
taticLibOne/res/values/values.xml
6b17d2cec2cc3bd97c684b7da490e3f6eab0d980 10-Aug-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Parse coreApp in <manifest> as boolean

Bug:30751662
Change-Id: I283be5725426ee084944c1921df40d1bd6188028
ppOne/AndroidManifest.xml
5e92c429ec912e3655b74e6161400d9743298b2d 30-Mar-2016 Ying Wang <wangying@google.com> Fix compilation using javac.

We still need to be able to compile all the Java source code in the tree
using javac, though the compiled code never ends up running on device.

Bug: 25958912
Change-Id: Id76663cdf768db579517515d7b7f51519b515fa8
taticLibOne/Android.mk
330c57dbd19a064d1f5a4adb3c8ed014711b473f 11-Mar-2016 Adam Lesinski <adamlesinski@google.com> Merge "AAPT2: Add descriptions of Attributes in Styleables for R.java" into nyc-dev
7656554f91b40bc93bf94c89afcad4a9a8ced884 11-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Add descriptions of Attributes in Styleables for R.java

Change-Id: I69e7b73cbdfe4baf502348397435c501ae29ff5e
taticLibOne/res/values/values.xml
c53244db5efb791d42b9b70c05ae8ed89b62c530 05-Mar-2016 Adam Lesinski <adamlesinski@google.com> Remove accidentally committed core dump file

Change-Id: I610abfbce62585c25e98b5c36ac9f496861e66e7
ppOne/core
626a69f34536d01db0847df0051199beaecce060 03-Mar-2016 Adam Lesinski <adamlesinski@google.com> AAPT2: Support --no-version-vectors

Change-Id: I8029b2f9e2f7ab8e37a49565f95210f47a7be609
ppOne/Android.mk
taticLibTwo/res/drawable/vector.xml
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
ndroid.mk
ppOne/Android.mk
ppOne/AndroidManifest.xml
ppOne/core
ppOne/res/drawable/icon.png
ppOne/res/drawable/image.xml
ppOne/res/drawable/test.9.png
ppOne/res/layout-v21/main.xml
ppOne/res/layout/main.xml
ppOne/res/raw/test.txt
ppOne/res/values-v4/styles.xml
ppOne/res/values/colors.xml
ppOne/res/values/styles.xml
ppOne/res/values/test.xml
ppOne/src/com/android/aapt/app/one/AppOne.java
taticLibOne/Android.mk
taticLibOne/AndroidManifest.xml
taticLibOne/res/layout/layout.xml
taticLibOne/res/values/values.xml
taticLibOne/src/com/android/aapt/staticlib/one/StaticLibOne.java
taticLibTwo/Android.mk
taticLibTwo/AndroidManifest.xml
taticLibTwo/res/layout/layout_two.xml
taticLibTwo/res/values/values.xml
taticLibTwo/src/com/android/aapt/staticlib/two/StaticLibTwo.java