summaryrefslogtreecommitdiffstats
path: root/tools/aapt
Commit message (Collapse)AuthorAgeFilesLines
* Fix AAPT daemon mode with paths containg spaces.Chris Warrington2015-02-091-15/+10
| | | | | | | | Use new line as a delimiter rather than space. Fixes: https://code.google.com/p/android/issues/detail?id=135757 Gradle CL: https://android-review.googlesource.com/130423 Change-Id: I7c73e680b0417b0e7cff9e0110822675c53ae20f
* AAPT: Use the right enum when checking for density configurationsAdam Lesinski2015-01-221-1/+1
| | | | | Bug:19116675 Change-Id: I2322d8d6bdf890005c80014273e5d07df735ed50
* AAPT: Handle all old unversioned attribute usageAdam Lesinski2015-01-143-48/+127
| | | | | | | | All references to attributes defined in pre-LOLLIPOP_MR1 SDK are moved to version qualified resource entries. Bug:18221682 Change-Id: Ifd739530ebcf99e6bc7ddb3f10bc5e05f0726e62
* Merge "AAPT: Copy android:revisionCode to Splits" into lmp-mr1-devAdam Lesinski2014-12-162-0/+16
|\
| * AAPT: Copy android:revisionCode to SplitsAdam Lesinski2014-12-162-0/+16
| | | | | | | | | | Bug:18706179 Change-Id: I669b56e0b67dd1bfda7749ef433b55af16851154
* | Merge "AAPT: attributes showing up after v21 attributes would be removed for ↵Adam Lesinski2014-12-151-25/+17
|\ \ | | | | | | | | | pre-21 devices" into lmp-mr1-dev
| * | AAPT: attributes showing up after v21 attributes would be removed for pre-21 ↵Adam Lesinski2014-12-101-25/+17
| |/ | | | | | | | | | | | | | | | | | | | | devices There was an inconsistency in the indexing when removing attributes in layouts. Now we account for that shift that happens when you delete an attribute. Bug:18707321 Change-Id: I656eee3fb614168fa8ceeff379e8594708961dad
* | AAPT: Dump status of required flag for uses-featureAdam Lesinski2014-12-081-5/+3
|/ | | | | | | | | Outside of a feature-group, the legacy uses-feature tag has a boolean required flag that should be emitted in dump badging. Bug:17790999 Change-Id: I43023af00e9c9ed4bc35795c3a983fc719bf9b7a
* Merge "AAPT: Move private attrs to new type for framework" into lmp-mr1-devAdam Lesinski2014-12-042-22/+161
|\
| * AAPT: Move private attrs to new type for frameworkAdam Lesinski2014-12-032-22/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Private attributes are typically placed after public attributes in the resource table. Each time a new version of the Android framework is released, new public attributes take the place of the private attributes, and the private attributes are shifted after the new public ones. This means that any apps built against the newer SDK may inadvertently be using private attributes on older devices. This change moves all private attributes to a completely different type ID, so there will never be collisions across versions. These private attributes are automatically moved to a synthesized type only for the system resources. Bug:18263655 Change-Id: I7a850512953fadcc9f3524d509cea30249782db8
* | AAPT: Add pathMotion custom classes to Proguard Keep setAdam Lesinski2014-12-021-6/+9
| | | | | | | | | | Bug:18590044 Change-Id: Ia5dbf55317d2cc89826316e8d10f031b5d340e57
* | AAPT: Add custom transition classes to Proguard keep setAdam Lesinski2014-12-021-0/+9
|/ | | | | Bug:18590044 Change-Id: Ib24831e669a09f0e6f32434081c0e2499702399c
* AAPT: Ignore densities specified in -c flagAdam Lesinski2014-11-101-0/+7
| | | | | | | The --preferred-density flag knows how to handle missing resources of specific densities. Using -c with a density leads to missing resources. Change-Id: I2251d842f48c08ed083663bb7ed608e14c4983c8
* split-select: Fix rules generated for anydpi densityAdam Lesinski2014-11-064-22/+55
| | | | Change-Id: I9de569ca9a76eb22df4d0e178df847ba1c7d0b01
* Add error checking to aapt for split generationAdam Lesinski2014-11-038-5/+237
| | | | Change-Id: Ica627db6a671f6a6c35f98bfd9c03598ffe103ce
* Merge "Build the split-select tool without C++11 support" into lmp-mr1-devAdam Lesinski2014-11-031-3/+37
|\
| * Build the split-select tool without C++11 supportAdam Lesinski2014-11-031-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | It was complicated to get the tool building on Windows, Linux, and OSX with C++11 support. OSX uses Clang to build C++11 binaries, which requires the libc++ standard library. Since most of the dependencies of this program are built against libstdc++, this was difficult to resolve. Now we build without C++11 support. Change-Id: I4e537c113734508a8f480a1c402ed237de4f0e60
* | Fix issues that will be present in C++11Adam Lesinski2014-11-039-63/+64
|/ | | | | | | | | | | - char16_t is a distinct type, so stay consistent with it throughout the code base. - char16_t is defined as minimum size of 16 bits. Since we mmap and cast data structures onto raw memory, we need a precise definition (uint16_t), so we cast between that (and static_assert that they are the same size). Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
* aapt updates for Android TVTim Kilbourn2014-10-241-1/+24
| | | | | | | - Output whether an app claims to be a game (android:isGame) - Output android:banner if it is specified at the application level. Change-Id: I7118b524f62cdfc4effeef21b32b3cdd814d9bfa
* First commit of split-select toolAdam Lesinski2014-10-234-7/+10
| | | | | | | This tool emits a set of rules as JSON for when a Split APK should match a target device. Change-Id: I8bfbdfbdb51efcfc645889dd03e1961f16e39645
* am 73a8c596: am 3f8c7dec: Merge "AAPT: Fix path for final generated ↵Adam Lesinski2014-10-201-1/+4
|\ | | | | | | | | | | | | resources on Windows" into lmp-dev * commit '73a8c5962d4d28a2e8aa6fa0b0b18e39782ee79c': AAPT: Fix path for final generated resources on Windows
| * AAPT: Fix path for final generated resources on WindowsAdam Lesinski2014-10-201-1/+4
| | | | | | | | Change-Id: Id11ac79b281b51747c73f90406ebd60023c54f92
* | am 83fae208: am 3cd840f4: Merge "AAPT: Fix an issue where a resource name ↵Adam Lesinski2014-10-171-1/+1
|\ \ | |/ | | | | | | | | | | was incorrectly derived on Windows" into lmp-dev * commit '83fae208fee402d8a6a51362f99660f9a49bd5a4': AAPT: Fix an issue where a resource name was incorrectly derived on Windows
| * AAPT: Fix an issue where a resource name was incorrectly derived on WindowsAdam Lesinski2014-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Calling String8::getLeaf() will assume the system's file path separator, however the source string was already converted to a unix path. getLeaf() would therefore not find any occurence of '\' and would return the full path. Bug:18036805 Change-Id: Ic2bfac0cc553406740204a296327e266b05c0eff
* | Minor resource notation/compatibility fixesAdam Lesinski2014-10-171-3/+3
|/ | | | | | | | - Change the format of mnc/mcc when printing a resource-qualifier formatted string from a Configuration object. - Correctly bump the SDK to 21 when using anydpi in a resource qualifier. Change-Id: I3c31e344dc5384d45398d6e9f264a073abab65d1
* Merge "Added a daemon mode to aapt to receive streams of commands from ↵Jerome Dochez2014-10-104-0/+40
|\ | | | | | | gradle." into lmp-dev
| * Added a daemon mode to aapt to receive streams of commands from gradle.Jerome Dochez2014-10-024-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crunching png, we used to spawn a separate aapt process from java which is slow and resource intensive. Introduced a daemon mode to appt which when invoked with -m parameter will listen from commands on stdin and give report of command execution on stdout. One one command is supported so far : s f1 f2 This command perform a single png crunch, f1 pointing to the input png file to crunch, and f2 pointing to the path for the resulting crunced file. Expected output from the command is "Done" or "Error". Change-Id: Iaf1d865e8d5ee5d36abe39dea6443715865a98d3
* | AAPT: Gate v21 resource synthesizing logging behind -v flagAdam Lesinski2014-10-031-20/+26
|/ | | | | | | This is verbose information and should be hidden behind the -v flag. Bug:17822471 Change-Id: I36e2c6beb54669a31cde73416427477a80ded8a6
* include direct.h for _mkdirAndrew Hsieh2014-09-301-0/+3
| | | | | | | | | Bug: 14416410 The new mingw-w64 toolchain x86_64-w64-mingw32-4.8 no longer declares _mkdir in io.h. Change-Id: I624b52d2f35db54a7f28df09f997fc883b0f0557
* AAPT: Fix issue with synthesized resource not actually showing upAdam Lesinski2014-09-242-1/+19
| | | | | | | | | | AAPT keeps around a few pieces of state that are disjoint, so simply adding to a collection won't add the resource to the final flattened output. Instead, we create the resource from the top and then copy over the values into the newly created resource. Bug:17647890 Change-Id: I214263e84c18f9370c6e6a5aa53aa2d833fc842d
* AAPT: Continuation of public/private attribute fixAdam Lesinski2014-09-229-36/+316
| | | | | | | | | | | XML files like layouts are now scanned and checked for v21 attributes. If those kinds of attributes are found, then we remove them in the original version and synthesize a new xml file under the v21 configuration. Bug:17520380 Change-Id: Icf984cb96134180a2e35349c1dbf2cef9a8f0bda
* Fix backwards compat problem with AAPT public attrsAdam Lesinski2014-09-183-3/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AAPT has traditionally assigned resource IDs to public attributes, and then followed those public definitions with private attributes. --- PUBLIC --- | 0x01010234 | attr/color | 0x01010235 | attr/background --- PRIVATE --- | 0x01010236 | attr/secret | 0x01010237 | attr/shhh Each release, when attributes are added, they take the place of the private attributes and the private attributes are shifted down again. --- PUBLIC --- | 0x01010234 | attr/color | 0x01010235 | attr/background | 0x01010236 | attr/shinyNewAttr | 0x01010237 | attr/highlyValuedFeature --- PRIVATE --- | 0x01010238 | attr/secret | 0x01010239 | attr/shhh Platform code may look for private attributes set in a theme. If an app compiled against a newer version of the platform uses a new public attribute that happens to have the same ID as the private attribute the older platform is expecting, then the behavior is undefined. We get around this by detecting any newly defined attributes (in L), copy the resource into a -v21 qualified resource, and delete the attribute from the original resource. This ensures that older platforms don't see the new attribute, but when running on L+ platforms, the attribute will be respected. We still need to address this problem in the platform moving forward, as this will only help us in the transition from pre L to L. Bug:17520380 Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
* Merge "Don't use reflection when generating the onResourcesLoaded callback." ↵Marcin Kosiba2014-09-112-104/+73
|\ | | | | | | into lmp-dev
| * Don't use reflection when generating the onResourcesLoaded callback.Marcin Kosiba2014-09-112-104/+73
| | | | | | | | | | BUG: 17466240 Change-Id: I74608f3d8b3617281639a9d387face97e15fb616
* | AAPT: Don't crash on illegal symbol nameAdam Lesinski2014-09-091-2/+6
|/ | | | | | | | | We never checked the return value when adding a nested symbol, which would be NULL if the symbol name was invalid. External bug: https://code.google.com/p/android/issues/detail?id=75876 Change-Id: I5211f4d4b87897d52f2b6e5907113d31930bb92d
* Change platformBuildVersionCode to name in aapt dump badgingAdam Lesinski2014-08-291-3/+3
| | | | Change-Id: Ie3972105b3f6a727682f91851f7a99b05bb28e1a
* Stamp platform version code into app ApksAdam Lesinski2014-08-279-251/+578
| | | | | | | | | | The versionCode of theframework resources that an app is built against gets stamped inside an app's AndroidManifest.xml in the <manifest> tag as "platformBuildVersionCode" and "platformBuildVersionName" attributes. Bug:17207635 Change-Id: Id573c3dffcbca38eec9c0eb3e89f4a547e3361d3
* Merge "Have R classes generate their own reference rewrite logic" into lmp-devAdam Lesinski2014-08-264-18/+194
|\
| * Have R classes generate their own reference rewrite logicAdam Lesinski2014-08-254-18/+194
| | | | | | | | Change-Id: I0e5b8311fc3479d966a49f9acf0d4c32a6a024d3
* | Introduce anydpi density resource qualifierAdam Lesinski2014-08-252-0/+8
|/ | | | | | | | | | This is meant to be used with scaleable vector drawables, and are chosen as the best match unless there is a configuration that matches the density requested exactly. Bug:17007265 Change-Id: Ic3288d0236fe0bff20bb1599aba2582c25b0db32
* AAPT: Filtering resource fixAdam Lesinski2014-08-223-6/+52
| | | | | | | | | | | | | | | | | | | | | Previously, when filtering resources from an APK using -c option, if one qualifier matched, we would keep the resource. However, in the case of something like -c fr-FR,sw360dp and with a resource in the APK like so drawable-fr-FR-sw600dp-v13 we would want this resource to be excluded, as it does not match the sw360dp qualifier (must be less than or equal to it). This CL fixed the behavior of the filter to require that all defined qualifier axis be matched. Bug:17142358 Change-Id: Ie48f3d516a0e610abc7ba8a7ced4eb3ab52534d4
* AAPT: Dump installLocation in badgingAdam Lesinski2014-08-221-0/+28
| | | | | Bug:17033144 Change-Id: I87dea9af47eef8bcba1465df9b49e355ac6346ec
* Merge "Add better error message for AAPT file conflicts" into lmp-devAdam Lesinski2014-08-211-9/+11
|\
| * Add better error message for AAPT file conflictsAdam Lesinski2014-08-211-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | Some resource directories may be the same even though their names are different. For instance, the "smallest width" qualifier was added in API 13, so the resource directory "values-sw600dp" and "values-sw600dp-v13" are the same and cause a conflict. The error reports that this might be the case. Change-Id: Ia35f1d670edd48265b3a7fe3d55656128421f612
* | AAPT: mipmaps should not end up in SplitsAdam Lesinski2014-08-214-10/+70
|/ | | | | | | | Mipmaps are never filtered, and so they will always end up in the base APK. Make sure they get omitted from any split. Change-Id: Id24b082bc9bd2d3f031a58bd0de4d30b4f0de7e0
* Use the correct versionCode for Split APKsAdam Lesinski2014-08-211-0/+7
| | | | | | | Insert the correct versionCode into the generated Split AndroidManifest.xml. Change-Id: I0aec797b5a4ff8bd70f9394b18aee5ad292b37c8
* AAPT: Fix regression generating dynamic ref table for shared librariesAdam Lesinski2014-08-201-17/+14
| | | | | | AAPT stopped generating dynamic reference tables for shared libraries. Change-Id: Ib0025811bdca1a4756eb21080dd6b6bb3fc1ca3d
* Allow enum generated IDs to reuse existing IDsAdam Lesinski2014-08-191-16/+17
| | | | Change-Id: Ida5dbbce1c4ecb0a4e57511555cec6448737be25
* Include build number in aapt versionAdam Lesinski2014-08-182-1/+13
| | | | | | | | | Teams are constantly confused over which version of aapt they are running. Include the build number from the Android build system in the binary. Can be retrieved by executing 'aapt version'. Change-Id: I9165c7d01f977344e143c2cb4dd963310ab28b72
* Revert "Include build number in aapt version"Adam Lesinski2014-08-182-2/+1
| | | | | | This reverts commit a7ce555ee82ed91345a54ee171dc9a415b65e134. Change-Id: I1018747766963e75bec11ddb01ba6d138f133959