summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
Commit message (Collapse)AuthorAgeFilesLines
* Add test to ensure themes get copied from separate resource tablesAdam Lesinski2014-08-2912-0/+315
| | | | Change-Id: I94e9966cf1e9d0e7e6c7daa0606a87bb0f67705e
* Clean up test allocations so real memory leaks are more visibleAdam Lesinski2014-08-292-32/+29
| | | | Change-Id: Ic405f08c8d8e3e7fc4e4a991671e980752c19899
* Merge "Fix memory leak in ResTable" into lmp-devAdam Lesinski2014-08-291-1/+1
|\
| * Fix memory leak in ResTableAdam Lesinski2014-08-281-1/+1
| | | | | | | | | | | | | | | | We were basically never cleaning any of the cached bags... oops :S Bug:16683269 Change-Id: Ic0a44218f660e16fbaac8df1d61ce6f1fdb0018b
* | Stamp platform version code into app ApksAdam Lesinski2014-08-271-1/+1
|/ | | | | | | | | | 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
* Introduce anydpi density resource qualifierAdam Lesinski2014-08-255-19/+155
| | | | | | | | | | 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: Fix regression generating dynamic ref table for shared librariesAdam Lesinski2014-08-201-11/+63
| | | | | | AAPT stopped generating dynamic reference tables for shared libraries. Change-Id: Ib0025811bdca1a4756eb21080dd6b6bb3fc1ca3d
* Fix assumption about DynamicRefTable in aaptAdam Lesinski2014-08-152-5/+16
| | | | | | | | | Packages without any resources should not expect to have a DynamicRefTable. Bug:16895517 Bug:17056720 Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
* Merge "Revert "Fix aapt dump for APKs with no resources"" into lmp-devAdam Lesinski2014-08-152-25/+17
|\
| * Revert "Fix aapt dump for APKs with no resources"Adam Lesinski2014-08-152-25/+17
| | | | | | | | | | | | | | | | This reverts commit 0e475302cd196f45a01a525c49089018b238d4ba. I'll re-upload this CL with the correct fix in LoadedApk. Change-Id: I17c6381f8e5907dab9f996f89c5d435b9c08a13a
* | Fix crash in ResStringPoolAdam Lesinski2014-08-151-3/+8
| | | | | | | | | | | | | | | | | | When a String isn't found in the StringPool, we should not try to construct a String8 object from the NULL string. Bug:15163956 Change-Id: I51e701918b10a72c18a860b8a36dce2afd9c0b82
* | Merge "Fix aapt dump for APKs with no resources" into lmp-devAdam Lesinski2014-08-142-17/+25
|\ \ | |/
| * Fix aapt dump for APKs with no resourcesAdam Lesinski2014-08-142-17/+25
| | | | | | | | | | | | | | | | All APKs are expected to have at least one resource table (even if it is empty). We were missing the creation of an empty DynamicRefTable. Bug:16895517 Change-Id: I6a6e887f91b3b4bbcc52b3fd2741ef3d05fab1fd
* | Print xxxhdpi from ResTable_config::toStringAdam Lesinski2014-08-141-0/+3
|/ | | | Change-Id: I2e1a07649cb498c12023b198d8e50534f9d91840
* Fix shared library bug in bag attributesAdam Lesinski2014-08-1110-42/+213
| | | | | | | | | | A ResTable_map entry has a name attribute, which could be a dynamic reference if it comes from a shared library. It was not being patched with the correct package id. Bug:16795890 Change-Id: Ia8df6a943269b2fefb2132c3ed74eb1997d7701b
* AAPT support for feature splitsAdam Lesinski2014-08-0418-505/+472
| | | | | | | | | | | | | | | | | | | | | | | This change allows the developer to add a base package for which to build a feature split. The generated resource types will begin after the base APK's defined types so as not to collide or override resources. Multiple features can be generated by first choosing an arbitrary order for the features. Then for each feature, the base APK and any preceding features are specified with the --feature-of flags. So with a base APK 'A' and features, 'B', and 'C', 'B' would be built with aapt package [...] --feature-of A [...] and 'C' would be built with aapt package [...] --feature-of A --feature-of B [...] Change-Id: I1be66e3f8df9a737b21c71f8a93685376c7e6780
* Ensure the ResTable data is at least the size of a ResTable_headerAdam Lesinski2014-07-291-6/+15
| | | Change-Id: Ib8d5574bd6a125797a582837987332e66721e84d
* Allow for appending of resources to an AssetManager.Martin Kosiba2014-07-171-84/+96
| | | | | BUG: 11505352 Change-Id: Ifa290580a6dc63c2f471d0bbf5f066db14aed4d7
* am 583a845c: am 3964ea46: am d74f99d3: Merge "Switch ↵Elliott Hughes2014-07-101-1/+0
|\ | | | | | | | | | | | | frameworks/base/libs/androidfw to the new icu." * commit '583a845c6eb6308d7ada72cb0e91444efc91cc54': Switch frameworks/base/libs/androidfw to the new icu.
| * am 3964ea46: am d74f99d3: Merge "Switch frameworks/base/libs/androidfw to ↵Elliott Hughes2014-07-101-1/+0
| |\ | | | | | | | | | | | | | | | | | | the new icu." * commit '3964ea46750cd5715f29ad4d9cada4a35208ad7a': Switch frameworks/base/libs/androidfw to the new icu.
| | * Switch frameworks/base/libs/androidfw to the new icu.Elliott Hughes2014-07-091-1/+0
| | | | | | | | | | | | Change-Id: Id82830750dd7e83bbc66811a1133b403cc697c97
* | | am 10eb3b06: am e0849423: am 501bb0a5: Merge "Fix issue when converting ↵Narayan Kamath2014-07-071-2/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | fil->tl." * commit '10eb3b0665dd7c636af5f0d657512c1a2e309e0c': Fix issue when converting fil->tl.
| * | am e0849423: am 501bb0a5: Merge "Fix issue when converting fil->tl."Narayan Kamath2014-07-071-2/+4
| |\ \ | | |/ | | | | | | | | | * commit 'e0849423214007d4377638fb42db15276e3ca575': Fix issue when converting fil->tl.
| | * Fix issue when converting fil->tl.Narayan Kamath2014-07-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should call ResourceTable::getLocales directly, and not AssetManager::getLocales. The latter will convert "tl" to "fil" so we'll end up thinking we have resources for "fil" when we don't really have any. bug: 15873165 Change-Id: I9753e4608aaecede328a40ee1f3ee6b016d0dedc
* | | resolved conflicts for merge of a8dbd7b4 to masterNick Kralevich2014-07-021-1/+56
|\ \ \ | |/ / | | | | | | Change-Id: I90f42546c6d0a8f21af3041e59baf6a226247b1c
| * | am 39e4f590: am f56399f6: Merge "Fall back to "tl" if "fil" is absent."Narayan Kamath2014-07-021-1/+56
| |\ \ | | |/ | | | | | | | | | * commit '39e4f590787246ce35b995c0c0ce37b676a05e0c': Fall back to "tl" if "fil" is absent.
| | * Fall back to "tl" if "fil" is absent.Narayan Kamath2014-07-021-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For JB-MR1, there was a hack that used "tl" where we really meant "fil" because ICU didn't have localizations for "fil". This has now been fixed, and we now support 3 letter language codes for AAPT so we can use "fil" where required. For the benefit of apps that need to target older platforms, we fall back to "tl" if the app has assets for "tl" and the resource locale is "fil". See bugs 7291355, 7207176 and 8049507 for more context. Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
* | | am 8c1c0a68: am 7f319c47: am 1dc550fa: Merge "Fix packing of values at ↵Narayan Kamath2014-07-012-3/+27
|\ \ \ | |/ / | | | | | | | | | | | | | | | offset 16." * commit '8c1c0a6881b1507f9ae25d753b64de185a7615b2': Fix packing of values at offset 16.
| * | am 7f319c47: am 1dc550fa: Merge "Fix packing of values at offset 16."Narayan Kamath2014-07-012-3/+27
| |\ \ | | |/ | | | | | | | | | * commit '7f319c47c8f5e947638eb1e5e73789ff83123bba': Fix packing of values at offset 16.
| | * Fix packing of values at offset 16.Narayan Kamath2014-06-302-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our bitmask for setting the highest bit to 0 for 0b11100000 (0xef) instead of 0b01111111 (0x7f) so we would end up setting bit 5 of each offset to zero. Fix this and expand test coverage by adding a fake language (tgp) that has this bit set in both its bytes. This issue was discovered while adding CTS tests for "tgl". Change-Id: Ibb6de03000951c907c252049771039ab7466187a
| * | am b20b0629: am 71dfc7e9: Merge "Memory leak in parsePackage"Narayan Kamath2014-06-241-5/+15
| |\ \ | | |/ | | | | | | | | | * commit 'b20b0629c2ea6a8e1f7bebd0791dd21e545a4605': Memory leak in parsePackage
| | * Merge "Memory leak in parsePackage"Narayan Kamath2014-06-241-5/+15
| | |\
| | | * Memory leak in parsePackageHenrik Baard2014-06-231-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method parsePackage failes to delete some resources in case of failures. Added delete of "package" in the cases that was previously missed. Change-Id: I183e9ec5864c5ed18bb48410ab41317cb3d96bda
* | | | Fix build break in log statementAdam Lesinski2014-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For logging purposes, a uint32_t was being converted into a void pointer, which on certain systems would be a conversion to a different size. Change-Id: I90af69ab975d84c9c8cbb1cce94ff4e9cc6edcf2
* | | | Support multiple resource tables with same packageAdam Lesinski2014-06-1824-1064/+2515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support APK split features, the resource table needs to support loading multiple resource tables with the same package but potentially new set of type IDs. This adds some complexity as the type ID space changes from dense and ordered to potentially sparse. A ByteBucketArray is used to store the type IDs in a memory efficient way that allows for fast retrieval. In addition, the IDMAP format has changed. We no longer need random access to the type data, since we store the types differently. However, random access to entries of a given type is still required. Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
* | | | am f5cb96cf: am 51736de1: am 4c488cca: Merge "[Asset Manager] Fix memory ↵Adam Lesinski2014-06-171-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | leakage bug" * commit 'f5cb96cfbbd2a7148b4b337097c94bea3f52d5f3': [Asset Manager] Fix memory leakage bug
| * | | am 51736de1: am 4c488cca: Merge "[Asset Manager] Fix memory leakage bug"Adam Lesinski2014-06-171-0/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit '51736de19a4c225a54cda73754d0f57aa68def4f': [Asset Manager] Fix memory leakage bug
| | * | [Asset Manager] Fix memory leakage bugsean_lu2014-06-161-0/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Symptom: memory leakage Root Cause: new SortedVector but not free it in native cpp Solution: free the SortedVector Project: AOSP Note: Change-Id: Iab5a7f2e8d8509631301e7231427927d4797c856
* | | Creating an empty package should be succesfullAdam Lesinski2014-06-091-1/+1
| | | | | | | | | | | | | | | Bug: 15473436 Change-Id: I788deb21a1298281c508429bab635aa713803984
* | | Fix potential crash in libandroidfwAdam Lesinski2014-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A malformed APK may cause a crash if it encodes its chunk size as a signed number (MSB set to 1). Bug:14898892 Change-Id: I342853c2b0859e5be15d712d451323afc367d329
* | | Add support for building split APKsAdam Lesinski2014-05-111-42/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 642421aa: am 5c31e487: Merge "Introduce new UI_MODE_TYPE_WATCH and ↵John Spurlock2014-04-041-0/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | 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/+3
| |\ \ | | |/ | |/| | | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | Default ui mode to watch if we have FEATURE_WATCH. Bug:13395758 Change-Id: Ie5ff95de60e69e91ad3612c7d2f1fca7f49061bd
* | | resolved conflicts for merge of 22d07464 to masterNarayan Kamath2014-03-274-18/+21
|\ \ \ | |/ / | | | | | | Change-Id: Ic037261eedd6e224938c960d2b4597590c81ed9d
| * | AArch64: Make frameworks/base code more portableAshok Bhat2014-03-274-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in this patch include [x] Use %zu for size_t, %zd for ssize_t [x] Some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Change-Id: Id1aaa7894a7d0b85ac7ecd7b2bfd8cc40374261f Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
* | | Shared library resource supportAdam Lesinski2014-03-253-62/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | am 9ca25502: am 48250e14: am 9a09a523: am 0b472ae1: Merge "androidfw: ↵Mark Salyzyn2014-03-196-98/+98
|\ \ \ | |/ / | | | | | | | | | | | | | | | resolve 64-bit build issues" * commit '9ca25502c05854288733ee5142e8bf6594821f83': androidfw: resolve 64-bit build issues
| * | androidfw: resolve 64-bit build issuesMark Salyzyn2014-03-196-98/+98
| | | | | | | | | | | | | | | | | | | | | | | | - uid_t/gid_t cast to unsigned long - unused argument warnings - tab and space requirements Change-Id: Ib446d8165b9082be02edb55e6b71fd1a03ea3431
* | | resolved conflicts for merge of 92860a74 to masterNarayan Kamath2014-03-101-36/+36
|\ \ \ | |/ / | | | | | | Change-Id: I3036ef9f1251c756092dc5ee2c4fed8146855e1e