summaryrefslogtreecommitdiffstats
path: root/tools/aapt/StringPool.cpp
Commit message (Collapse)AuthorAgeFilesLines
* aapt: move qsort_r_compat here as it is sole clientDima Zavin2013-05-071-1/+1
| | | | | | | | | This code is only used on the host for MacOS X compatibility. Apparently, glibc and Apple's libc disagree on the parameter ordering. Change-Id: I214edcf2870b6ac88316306ac5af43f1dadf9b2e Signed-off-by: Dima Zavin <dima@android.com>
* Use qsort_r_compat() as a portable wrapper for qsort_r().Jeff Brown2012-03-191-11/+2
| | | | Change-Id: Ie79f81625947f4e95122047605d994c86e872e74
* Fix build break on glibc hosts.Jeff Brown2012-03-191-0/+10
| | | | Change-Id: Ida70bec6ea972d042982428353cbbc33cde25136
* Use quicksort to sort the string pool.Jeff Brown2012-03-161-5/+9
| | | | | | | | | | | The current implementation of Vector::sort uses insertion sort on the assumption that the data is mostly sorted. It isn't. This change brings the total time spent sorting packages by config down to 500ms from about 93 seconds. Bug: 6186278 Change-Id: Iec8da11e09297acd6c73733d063b0fa9dacf69f7
* Add some comments about StringPool sort order.Jeff Brown2012-03-161-2/+4
| | | | Change-Id: I57f24d46328a6bfef883819eaf95c03114d573bb
* Remove dead code in StringPool.Jeff Brown2012-03-161-77/+15
| | | | | | | The sorted string pool option was no longer used. Neither were strings with associated identifiers. Change-Id: Ic5f6368637fbeedfda873d63f4ad0f3ea9d0d603
* Fix an issue where a non-styled string could be made into a styled stringBen Gruver2012-03-071-1/+3
| | | | | | | | If a styled version of an otherwise identical string is encountered before a non-styled version, aapt merges the two, effectively making the non-styled string have a spurious style. Change-Id: I424a61c0c83c59e0b9c8939e457402efd06a7a4f
* aapt now sorts the strings in the resource string pool.Dianne Hackborn2012-01-311-18/+226
| | | | | | | | | | | In our current environment with very many translations, this can save a lot of RAM -- for example over 200K in Gmail just by sorting the strings in the Gmail .apk (not the framework). Also add a new aapt command to print the contents of the resource table string pool. Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
* AAPT fix printf %zd crash on Windows.Raphael2011-10-271-1/+9
| | | | | | | | | There's no printf %zd on Mingw/Cygwin so the verbose printf crashes aapt. SDK bugs: 20395, 20986 Change-Id: I5b8ac36749263205a19f1448b1aaca90d5a2e06d
* Change assets to use 64-bit APIKenny Root2010-12-081-1/+1
| | | | | | | | | | | | | The asset system and supporting libraries were using off_t instead of off64_t to access files larger than 2GB (32-bit signed). This change replaces all off_t with off64_t and lseek64. There is a new utils/Compat.h added for Mac OS compatibility. Also fixed some size-related compiler warnings. Bug: 3205336 Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
* Fixes a few minor problems with AAPTSteve Block2010-06-251-1/+1
| | | | | | | | | | - Fixes casting problems with stricter compilers - Adds a couple of missing ifdef guards This is a first step toward being able to generate APKs on the fly on the device. Bug: 2766918 Change-Id: Icaaee5a4032afa313256add321b447443861dd85
* Use UTF-8 strings to avoid duplicate caching, part 1Kenny Root2010-02-231-2/+6
| | | | | | | | | | | | StringBlock instances containing UTF-8 strings use a cache to convert into UTF-16, but using that cache and then using a JNI call to NewString causes the UTF-8 string as well as two copies of the UTF-16 string to be held in memory. Getting the UTF-8 string directly from the StringPool eliminates one copy of the UTF-16 string being held in memory. This is part 1. Part 2 will include ResXMLParser optimizations. Change-Id: Ibd4509a485db746d59cd4b9501f544877139276c
* Add the --rename-manifest-package option to aapt.Jeff Hamilton2010-02-011-1/+1
| | | | | | | It allows you to force override the manifest package listed in the AndroidManifest.xml when creating an APK file. Change-Id: I7eac7943c4e56610b65728ae54773a273634fd9d
* Optional use of UTF-8 strings in resource bundlesKenny Root2009-12-071-12/+50
| | | | | | | | | | | | | | | Allows the use of UTF-8 for packing resources instead of the default of UTF-16 for Java. When strings are extracted from the ResStringPool, they are converted to UTF-16 and the result is cached for subsequent calls. When using aapt to package, add in the "-8" switch to pack the resources using UTF-8. This will result in the value, key, and type strings as well as the compiled XML string values taking significantly less space in the final application package in most scenarios. Change-Id: I129483f8b3d3b1c5869dced05cb525e494a6c83a
* Fix bitmask in aapt's StringPool length constructionKenny Root2009-12-041-1/+1
| | | | | | | | | | The StringPool indicates the length of a string with a 16-bit integer. If the length of the string is greater than 0x7FFF, it splits it into two 16-bit integers with the first one having the high bit set. The length calculation has a small bug that masks off the 19 bits instead of the first 15 bits as intended.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+369
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-369/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+369