summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Command.cpp
Commit message (Collapse)AuthorAgeFilesLines
* am 510c24e8: Merge "Fix AAPT daemon mode with paths containg spaces." into ↵Chris Warrington2015-02-101-15/+10
|\ | | | | | | | | | | | | | | | | lmp-mr1-dev automerge: 4499888 * commit '449988872be61f273c91db13069d5b7172429032': Fix AAPT daemon mode with paths containg spaces.
| * 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
* | am c765655a: am fbba9b57: Merge "AAPT: Dump status of required flag for ↵Adam Lesinski2014-12-091-5/+3
|\ \ | |/ | | | | | | | | | | uses-feature" into lmp-mr1-dev * commit 'c765655ae1ae35f9d5f0958295f0b71270132ca7': AAPT: Dump status of required flag for uses-feature
| * 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 updates for Android TV" into lmp-mr1-dev automerge: 6af7d76Tim Kilbourn2014-10-241-1/+24
|\ \ | |/ | | | | | | | | | | automerge: 181c18e * commit '181c18efd438f7a5e8cc18327367c49bf51795be': aapt updates for Android TV
| * 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
* | am e36550dc: am 0757e5fd: am c9c512e0: am f47f8855: Merge "Added a daemon ↵Jerome Dochez2014-10-101-0/+35
|\ \ | |/ | | | | | | | | | | mode to aapt to receive streams of commands from gradle." into lmp-dev * commit 'e36550dc9e202450d0921bf65d00d14e7e3e8a54': Added a daemon mode to aapt to receive streams of commands from gradle.
| * Added a daemon mode to aapt to receive streams of commands from gradle.Jerome Dochez2014-10-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 152d9aae: am 31629651: Merge "Frameworks/base: Fix more aapt issues"Andreas Gampe2014-10-021-4/+9
|\ \ | | | | | | | | | | | | * commit '152d9aae631381ea28f5701168d372a1486a7502': Frameworks/base: Fix more aapt issues
| * | Frameworks/base: Fix more aapt issuesAndreas Gampe2014-10-011-4/+9
| | | | | | | | | | | | Change-Id: I6da7dc674e9f9e3b0886a3cfd1e3194d6b5ac948
* | | am 972628dc: am 5128e88e: Merge "Don\'t use reflection when generating the ↵Marcin Kosiba2014-09-111-1/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | onResourcesLoaded callback." into lmp-dev * commit '972628dc8c63b02b75f9e976b3ab67e3913da1a8': Don't use reflection when generating the onResourcesLoaded callback.
| * | Don't use reflection when generating the onResourcesLoaded callback.Marcin Kosiba2014-09-111-1/+2
| | | | | | | | | | | | | | | BUG: 17466240 Change-Id: I74608f3d8b3617281639a9d387face97e15fb616
* | | resolved conflicts for merge of 1d99636f to lmp-dev-plus-aospDan Albert2014-09-091-10/+3
|\ \ \ | |/ / |/| / | |/ Change-Id: Ic5f808de7d9722056112c6a73c718892e00bc9df
| * Merge "Don't check for null references."Dan Albert2014-09-091-11/+2
| |\
| | * Don't check for null references.Dan Albert2014-09-081-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | The address of a reference will never be null in well formed C++ code. The function returning the value being checked simply returns a dereferenced pointer (which is just going to segfault if it is null!). Change-Id: I3a4eb6adfc003c63ebf21b81d46088d52154d99d
| * | Use char16_t for char things.Dan Albert2014-09-081-3/+3
| |/ | | | | | | | | | | | | When compiling in C++ mode, the compiler will complain about conversions from uint16_t to char16_t. Be consistent in using char16_t for strings. Change-Id: I052b6176ced635162920b31560052d9a64f92764
* | 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-271-244/+127
| | | | | | | | | | | | | | | | | | | | 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
* | Have R classes generate their own reference rewrite logicAdam Lesinski2014-08-251-5/+7
| | | | | | | | Change-Id: I0e5b8311fc3479d966a49f9acf0d4c32a6a024d3
* | AAPT: Dump installLocation in badgingAdam Lesinski2014-08-221-0/+28
| | | | | | | | | | Bug:17033144 Change-Id: I87dea9af47eef8bcba1465df9b49e355ac6346ec
* | Include build number in aapt versionAdam Lesinski2014-08-181-1/+5
| | | | | | | | | | | | | | | | | | 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-181-1/+1
| | | | | | | | | | | | This reverts commit a7ce555ee82ed91345a54ee171dc9a415b65e134. Change-Id: I1018747766963e75bec11ddb01ba6d138f133959
* | Include build number in aapt versionAdam Lesinski2014-08-181-1/+1
| | | | | | | | | | | | | | | | | | 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: Ie4692fb160c7cbe720a8e76b73e435170214fe0e
* | AAPT: Output only 64-bit arch when multiArch is trueAdam Lesinski2014-08-151-4/+64
| | | | | | | | | | | | | | | | | | | | | | | | When android:multiArch="true" in the <application> tag, aapt dump badging should only output the 64-bit architecture under the 'native-code' entry. Other architectures will be emitted under the 'alt-native-code' entry. Bug:17061929 Change-Id: I8310b2388b06a2ed571e5e121e4989403082ba68
* | Merge "Add FeatureGroup to PackageInfo" into lmp-devAdam Lesinski2014-08-151-6/+2
|\ \
| * | Add FeatureGroup to PackageInfoAdam Lesinski2014-08-151-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FeatureGroups replace top-level FeatureInfo objects. FeatureGroups inherit top-level FeatureInfos but override them if the feature names are the same. Bug:16822121 Change-Id: I80b2cb778a0fbcb4521efce986fba641e0914290
* | | Fix assumption about DynamicRefTable in aaptAdam Lesinski2014-08-151-5/+2
|/ / | | | | | | | | | | | | | | | | Packages without any resources should not expect to have a DynamicRefTable. Bug:16895517 Bug:17056720 Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
* | AAPT: Dump an APK's split name attributeAdam Lesinski2014-08-121-1/+8
| | | | | | | | | | Bug:16919497 Change-Id: I109e21bff9e4a64a10f48dce7f2d41102b32ee1d
* | Modify base Configuration used for aapt dump badgingAdam Lesinski2014-08-041-0/+1
| | | | | | | | | | | | | | | | Some apps don't provide defaults when providing icons for different screen sizes, so use a configuration that has a screen size set to NORMAL. Change-Id: If4b9eebd37e5d2e2991301d09ff5c39dd41c1565
* | Add shared library support to aapt dumpAdam Lesinski2014-07-301-10/+17
| | | | | | | | | | | | | | | | AAPT dump should be able to handle dynamic references that often come with shared library resources. Bug:16678251 Change-Id: I6c8cd943145aab20ca9db9694c8c433b3c64279b
* | Have AEP GL feature depend on GLES 3.1 in badgingAdam Lesinski2014-07-251-13/+41
| | | | | | | | | | | | | | | | AAPT dump badging should output the uses-gl-es tag with a version of 3.1 when android.hardware.opengles.aep is declared as a feature. Change-Id: I8affc6dad574c8303c6ba9810ad8e6e205ea9506
* | Add <feature-group> tag and change aapt badgingAdam Lesinski2014-07-231-219/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A <feature-group> represents a set of features required for an app to be compatible with a device. Multiple <feature-group> elements represent a logical 'or' of required features. Features defined in the old way with <uses-feature> tags under the <manifest> tag are automatically added to each feature-group defined. Defining a <feature-group> means that any default features are not included (such as android.hardware.touchscreen) and declared permissions do not imply any features. Change-Id: I45626f0fdc546e47bcf2aead7ef05ebcca12b023
* | Add a BIND_DREAM_SERVICE signature-level permission.John Spurlock2014-06-271-0/+13
| | | | | | | | | | | | | | | | | | | | Starting in api 21, will be required to bind to a declared dream or doze service. Also added to aapt dump badging output. Bug:15862654 Change-Id: Ifa0a594eeecf21e6146176c7810a847e1d08fe3b
* | Dump more info about behaviors an APK offersAdam Lesinski2014-06-241-17/+114
| | | | | | | | | | | | | | | | | | Behaviors include things like print services, custom launchers, camera apps, etc. Bug:13748429 Change-Id: I9fb83bac95b1be61fc630c1e74daf0f4a8b9b27f
* | Don't dump data from a bad ResTableAdam Lesinski2014-05-191-0/+3
| | | | | | | | | | | | | | | | | | AAPT dumps data from a bad ResTable, which causes crashes. Prevent this by checking if there were errors when creating the ResTable. Bug:14902008 Change-Id: I5e04ebf967c60b78c511dd175785a13bca52f09a
* | Merge "AAPT dump badging should allow refs in meta-data"Adam Lesinski2014-05-151-1/+1
|\ \
| * | AAPT dump badging should allow refs in meta-dataAdam Lesinski2014-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The framework allows references in the <meta-data> element in an AndroidManifest.xml, so badging should do the same. Bug:14088271 Change-Id: Ia8157655e21adaf11b7ace90a98a9cca3c8a476c
* | | Merge "Fix crash in AAPT dump badging with bad StringPool"Adam Lesinski2014-05-151-7/+38
|\ \ \
| * | | Fix crash in AAPT dump badging with bad StringPoolAdam Lesinski2014-05-151-7/+38
| |/ / | | | | | | | | | | | | | | | | | | | | | With a malformed StringPool, AAPT dump badging would crash trying to retrieve the name of an XML tag. Bug:14658555 Change-Id: I6aa6c53c60b20725a461da2d3a39685c174b4d35
* | | Quick fix to ensure mipmap doesn't get stripped by AAPTAdam Lesinski2014-05-131-3/+14
|/ / | | | | | | | | | | | | | | This is a quick fix. A refactoring is already underway to properly solve this problem. Bug:14857725 Change-Id: Ic0c475aa0b180803a687904ad9f71eb87e137a25
* | Add support for building split APKsAdam Lesinski2014-05-111-7/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Build multiple APKs, each containing a disjoint subset of configurations. These can then be loaded into the device AssetManager and should operate as if they were never split. Use the idea of building multiple sets of files, where each set represents an APK. An ApkBuilder can place files in a set based on its configuration, but you can actually add directly to a set, in the case of the resources.arsc and generated AndroidManifest.xml for splits. Change-Id: Ic65d3f0ac1bbd290185695b9971d425c85ab1de3
* | resolved conflicts for merge of 56ca8219 to masterElliott Hughes2014-04-181-2/+5
|\ \ | | | | | | | | | Change-Id: I62f5804a5c4404eedce09188cda2e3b1bb990b36
| * \ resolved conflicts for merge of ec42199a to klp-modular-dev-plus-aospElliott Hughes2014-04-181-2/+5
| |\ \ | | |/ | | | | | | Change-Id: I9ecd5d51be4d073ab93dbb0bd60097735e76bf94
| | * Pseudolocalizer improvements.Anton Krumin2014-04-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes accented pseudolocalization and adds RTL pseudolocale. This change contains following modifications in the pseudolocalization logic: 1) zz_ZZ pseudolocale was removed; 2) en_XA pseudolocale was added for pseudo-accented; 3) ar_XB pseudolocale was added for pseudo-rtl; 4) Pseudo RTL localization functionality was implemented; 5) Text expansion functionality was implemented; 6) Text bracketing was implemented; 7) Couple of issues of previous implementation were fixed. Change-Id: I9f7f27bed717e39e82717d15c398decffc8bec3c Signed-off-by: Anton Krumin <antkrumin@google.com>
* | | resolved conflicts for merge of a81ee86b to masterTim Kilbourn2014-03-071-9/+34
|\ \ \ | |/ / | | | | | | Change-Id: I7be3a64261d2405eda55b43c02b47657f393c095
| * | am b559b371: Merge "Dump leanback info in aapt dump badging." into ↵Tim Kilbourn2014-03-081-8/+32
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | klp-modular-dev * commit 'b559b37150d24411f0b5ef102ced8d5acf858a0e': Dump leanback info in aapt dump badging.
| | * | Dump leanback info in aapt dump badging.Tim Kilbourn2014-03-071-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | Leanback launcher activities are reported, including the banner. Change-Id: Ifa496736ad3ba4239ec95e166768af895ff4dc53
| * | | am 28879bbf: am be57fca4: Merge "Extended locales in AAPT / AssetManager."Narayan Kamath2014-02-171-0/+1
| |\ \ \ | | |/ / | |/| / | | |/ | | | * commit '28879bbfe89dc4bf2067a7183975ecffb82f68e6': Extended locales in AAPT / AssetManager.
| | * Extended locales in AAPT / AssetManager.Narayan Kamath2014-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support 3 letter language codes, script codes & variants. The bulk of the changes are related to the implementation of command line filtering of locales etc. The previous code assumed that the value of each "axis" (locale, density, size etc.) could be represented by a 4 byte type. This is no longer the case. This change introduces a new class, AaptLocaleValue which holds a (normalized) locale parsed from a directory name or a filter string. This class takes responsibility for parsing locales as well as writing them to ResTable_config structures, which is their representation in the resource table. This includes minor changes at the java / JNI level for AssetManager. We now call locale.toLanguageTag() to give the native layer a well formed BCP-47 tag. I've removed some duplicated parsing code in AssetManager.cpp and replaced them with functions on ResTable_config. The native getLocales function has been changed to return well formed BCP-47 locales as well, so that the corresponding java function can use Locale.forLanguageTag to construct a Locale object out of it. Finally, this change introduces default and copy constructors for ResTable_config to prevent having to memset() the associated memory to 0 on every stack allocation. (cherry-picked from commit 91447d88f2bdf9c2bf8d1a53570efef6172fba74) Change-Id: I1b43086860661012f949fb8e5deb7df44519b854
* | | Extended locales in AAPT / AssetManager.Narayan Kamath2014-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support 3 letter language codes, script codes & variants. The bulk of the changes are related to the implementation of command line filtering of locales etc. The previous code assumed that the value of each "axis" (locale, density, size etc.) could be represented by a 4 byte type. This is no longer the case. This change introduces a new class, AaptLocaleValue which holds a (normalized) locale parsed from a directory name or a filter string. This class takes responsibility for parsing locales as well as writing them to ResTable_config structures, which is their representation in the resource table. This includes minor changes at the java / JNI level for AssetManager. We now call locale.toLanguageTag() to give the native layer a well formed BCP-47 tag. I've removed some duplicated parsing code in AssetManager.cpp and replaced them with functions on ResTable_config. The native getLocales function has been changed to return well formed BCP-47 locales as well, so that the corresponding java function can use Locale.forLanguageTag to construct a Locale object out of it. Finally, this change introduces default and copy constructors for ResTable_config to prevent having to memset() the associated memory to 0 on every stack allocation. Change-Id: I899a56a9a182ee6be52b9389d1ae59266f5482e9