summaryrefslogtreecommitdiffstats
path: root/tools/aapt
Commit message (Collapse)AuthorAgeFilesLines
* Don't dump data from a bad ResTableAdam Lesinski2014-05-192-0/+11
| | | | | | | | | 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-132-3/+18
|/ | | | | | | | This is a quick fix. A refactoring is already underway to properly solve this problem. Bug:14857725 Change-Id: Ic0c475aa0b180803a687904ad9f71eb87e137a25
* Merge "Add support for building split APKs"Adam Lesinski2014-05-1225-1889/+2236
|\
| * Add support for building split APKsAdam Lesinski2014-05-1125-1893/+2241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | am 86768034: am b593ad60: am f1f28d1d: Merge "Skip resource files for ↵Elliott Hughes2014-05-061-0/+15
|\ \ | | | | | | | | | | | | | | | | | | locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice." * commit '867680342e12af59a26756f30cf817a131724943': Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
| * \ am b593ad60: am f1f28d1d: Merge "Skip resource files for locales en-XA and ↵Elliott Hughes2014-05-061-0/+15
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice." * commit 'b593ad60682a6f8c945c4c2ffc3d278df3f6e360': Skip resource files for locales en-XA and ar-XB during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice.
| | * | Skip resource files for locales en-XA and ar-XBIgor Viarheichyk2014-05-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | during packaging if pseudolocalization was done automatically. This prevents attemts to add same resource twice. Change-Id: I51e17f961ac44047bf466ce4aa0d4d17f4ded0d6
* | | | am 0472fb58: am 34dd2cdd: am f2d2c871: AAPT should not process XML that ↵Adam Lesinski2014-05-051-4/+5
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | | | | | | | failed to compile * commit '0472fb5882cfe55577a169a0f0ff4b8920a839b0': AAPT should not process XML that failed to compile
| * | am 34dd2cdd: am f2d2c871: AAPT should not process XML that failed to compileAdam Lesinski2014-05-051-4/+5
| |\ \ | | | | | | | | | | | | | | | | * commit '34dd2cdd4142ca8c7463b9f831429b4366fa222a': AAPT should not process XML that failed to compile
| | * \ am f2d2c871: AAPT should not process XML that failed to compileAdam Lesinski2014-05-051-4/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | * commit 'f2d2c871813656012420faa89080d8e3cda1f308': AAPT should not process XML that failed to compile
| | | * | AAPT should not process XML that failed to compileAdam Lesinski2014-05-051-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AAPT would attempt to warn if an unprefixed 'id' attribute was used in an XML resource file even if that XML file failed to compile. The result was undefined behaviour, including crashing the process. Change-Id: I1a9464ec937760e8d38bbe1af8d1b5d6b2c105a2
* | | | | am fd955f14: am 6a6979ad: am 86315c45: Merge "Fixes issue causing ↵Elliott Hughes2014-04-301-2/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | pseudolocalization of strings in non-translatable resource files." * commit 'fd955f14d6c87dffd1a20c36ad8001705495f831': Fixes issue causing pseudolocalization of strings in non-translatable resource files.
| * | | | am 6a6979ad: am 86315c45: Merge "Fixes issue causing pseudolocalization of ↵Elliott Hughes2014-04-301-2/+1
| |\ \ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | strings in non-translatable resource files." * commit '6a6979ad17dfb492fb85a979e8f8688e4ed973b2': Fixes issue causing pseudolocalization of strings in non-translatable resource files.
| | * | | Fixes issue causing pseudolocalization of stringsIgor Viarheichyk2014-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in non-translatable resource files. Change-Id: Ic8e5effc86226d5be00561ac71bab7695ef90376
* | | | | Child nodes of <preference-headers> now output proguard keep options.Adam Lesinski2014-04-251-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Bug:13797600 Change-Id: I55c71a2fcf7f9b4bdad684d5c235981c3a8bc1e9
* | | | | am 36e64ab9: am cf4d85e4: am 90840ec2: Merge "Fix warning introduced by ↵Elliott Hughes2014-04-181-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | recent psuedolocalizer change." * commit '36e64ab902a6932f2711d1dff6ee273610d68e7d': Fix warning introduced by recent psuedolocalizer change.
| * | | | am cf4d85e4: am 90840ec2: Merge "Fix warning introduced by recent ↵Elliott Hughes2014-04-181-1/+1
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | psuedolocalizer change." * commit 'cf4d85e4786beb98743eac68b71d67e36f76c058': Fix warning introduced by recent psuedolocalizer change.
| | * | | Fix warning introduced by recent psuedolocalizer change.Elliott Hughes2014-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I577caf6ca4261b3d044b18bc8c5915012168031d
* | | | | resolved conflicts for merge of 56ca8219 to masterElliott Hughes2014-04-189-104/+335
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I62f5804a5c4404eedce09188cda2e3b1bb990b36
| * | | | resolved conflicts for merge of ec42199a to klp-modular-dev-plus-aospElliott Hughes2014-04-189-104/+335
| |\ \ \ \ | | |/ / / | | | | | | | | | | Change-Id: I9ecd5d51be4d073ab93dbb0bd60097735e76bf94
| | * | | Pseudolocalizer improvements.Anton Krumin2014-04-099-105/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | am 642421aa: am 5c31e487: Merge "Introduce new UI_MODE_TYPE_WATCH and ↵John Spurlock2014-04-041-0/+5
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | qualifier." into klp-modular-dev * commit '642421aa7f284817cc1a972a7f9c7a64696a0116': Introduce new UI_MODE_TYPE_WATCH and qualifier.
| * | | | am 5c31e487: Merge "Introduce new UI_MODE_TYPE_WATCH and qualifier." into ↵John Spurlock2014-04-041-0/+5
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | klp-modular-dev * commit '5c31e487c4577e1c47ee7c949325d6a13f0d462e': Introduce new UI_MODE_TYPE_WATCH and qualifier.
| | * | | Introduce new UI_MODE_TYPE_WATCH and qualifier.John Spurlock2014-04-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default ui mode to watch if we have FEATURE_WATCH. Bug:13395758 Change-Id: Ie5ff95de60e69e91ad3612c7d2f1fca7f49061bd
| * | | | am 004ceaaa: am 55a65509: Merge "Reduce warning verbosity in aapt"Adam Lesinski2014-03-274-92/+98
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | * commit '004ceaaa4d3ddfc66ba3f3635e987c2ddc7f2d09': Reduce warning verbosity in aapt
| | * | | Reduce warning verbosity in aaptAdam Lesinski2014-03-244-92/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Attributed source of problems to the correct file. - Only verify string localizations against valid locales. Bug:13140015 Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269
* | | | | Shared library resource supportAdam Lesinski2014-03-259-19/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shared libraries can now export resources for applications to use. Exporting resources works the same way the framework exports resources, by defining the public symbols in res/values/public.xml. Building a shared library requires aapt to be invoked with the --shared-lib option. Shared libraries will be assigned a package ID of 0x00 at build-time. At runtime, all loaded shared libraries will be assigned a new package ID. Currently, shared libraries should not import other shared libraries, as those dependencies will not be loaded at runtime. At runtime, reflection is used to update the package ID of resource symbols in the shared library's R class file. The package name of the R class file is assumed to be the same as the shared library's package name declared in its manifest. This will be customizable in a future commit. See /tests/SharedLibrary/ for examples of a shared library and its client. Bug:12724178 Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
* | | | | Reduce warning verbosity in aaptAdam Lesinski2014-03-204-92/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Attributed source of problems to the correct file. - Only verify string localizations against valid locales. Bug:13140015 Change-Id: I9dabc5efa0510649caee8af0c8ebb803d6f48269
* | | | | resolved conflicts for merge of 92860a74 to masterNarayan Kamath2014-03-101-52/+28
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I3036ef9f1251c756092dc5ee2c4fed8146855e1e
| * | | | am bbf82665: am 6e2fb587: Merge "LP64: Make 9 patches architecture agnostic."Narayan Kamath2014-03-101-50/+25
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | * commit 'bbf826659e8e5d0be683b2459207c495303d53b6': LP64: Make 9 patches architecture agnostic.
| | * | | LP64: Make 9 patches architecture agnostic.Narayan Kamath2014-03-101-50/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Res_png_9patch struct had several pointer members whose size differed between 32 and 64 bit platforms. These members have been replaced by uint32_t offsets to serialized data. The serialized form for 9patches places a Res_png_9patch object at the beginning of serialized data, followed by int32_t arrays of xDivs, yDivs and colors. Note that these offsets are not strictly required, since they can be computed from the values of numXDivs, numYDivs & numColors, however they are called in tight loops so having them computed once is a beneficial. This change also removed the unused patch_equals function from aapt's Image.cpp. Change-Id: I3b9ac8ae5c05510d41377cae4dff1c69b40c2531
* | | | | 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.
| | * | | Merge "Dump leanback info in aapt dump badging." into klp-modular-devTim Kilbourn2014-03-081-8/+32
| | |\ \ \
| | | * | | 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 71364f8c: am f5f4d930: am 74bebf6f: Exclude the host aapt and aidl from ↵Ying Wang2014-03-081-2/+2
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PDK build. * commit '71364f8c1e1bcc84375830dd5904dfe7cdfb5ed6': Exclude the host aapt and aidl from PDK build.
| * | | | | am 74bebf6f: Exclude the host aapt and aidl from PDK build.Ying Wang2014-03-081-2/+2
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '74bebf6faed2d34814ffc3d46664330ea568f7b2': Exclude the host aapt and aidl from PDK build.
| | * | | | Exclude the host aapt and aidl from PDK build.Ying Wang2014-03-071-2/+2
| | |/ / / | | | | | | | | | | | | | | | | | | | | Bug: 13028632 Change-Id: I0f774b19be77462d0fa271088a4a5a152729d13c
| * | | | am 28879bbf: am be57fca4: Merge "Extended locales in AAPT / AssetManager."Narayan Kamath2014-02-178-224/+522
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | * commit '28879bbfe89dc4bf2067a7183975ecffb82f68e6': Extended locales in AAPT / AssetManager.
| | * | | Extended locales in AAPT / AssetManager.Narayan Kamath2014-02-148-224/+522
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Add --replace-version flag to aapt.Jeff Davidson2014-02-253-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation: we'd like to programmatically specify the version name/code (i.e. to include the build number from the build server). However, this means that we cannot specify version info in the AndroidManifest.xml file, as this takes precedence. Not doing so makes IDE use more difficult, as the IDE gets version code 0 and won't install over an existing non-IDE version unless you first force a downgrade to an IDE build from the command line. This flag allows us to specify a very high version code in the AndroidManifest.xml file, making IDE builds take precedence, while still allowing us to override this info when performing command-line (official) builds. Change-Id: I5d01048698af5c26bdf19066c6cd4eca1115112a
* | | | | Extended locales in AAPT / AssetManager.Narayan Kamath2014-02-108-224/+522
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | resolved conflicts for merge of 1b5b60d6 to masterAdam Lesinski2014-02-045-26/+38
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I2b713a55fcdf02c01afa99f175bf14248f210460
| * | | | am 203356a3: Merge "Add support for multiple asset dirs (-A)" into ↵Adam Lesinski2014-02-045-25/+38
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / | | | | | | | | | | | | klp-modular-dev * commit '203356a34a82bfc759be02dfa1caa4529dce0732': Add support for multiple asset dirs (-A)
| | * | Merge "Add support for multiple asset dirs (-A)" into klp-modular-devAdam Lesinski2014-02-045-25/+38
| | |\ \
| | | * | Add support for multiple asset dirs (-A)Adam Lesinski2014-01-235-25/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Bug: 12608034 Change-Id: I02c5a1a73b83498d799570428cca3dd914f8ac11