summaryrefslogtreecommitdiffstats
path: root/tools/aapt/ResourceTable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* resolved conflicts for merge of 10d5b096 to masterDianne Hackborn2010-10-041-8/+10
|\ | | | | | | Change-Id: Id5c6ba651f72b48f0d70ee2ca64a6c9adf5e74f7
| * Add new API to find out whether external storage is removable.Dianne Hackborn2010-10-041-8/+10
| | | | | | | | | | | | | | | | This is implemented based on whether we are using the "nosdcard" product. Needed to tweak aapt to allow use of the product attribute with other resource definition tags besides strings. Change-Id: I49922d23b52a34183a8e2f4d2515adaf1fc9149a
* | am 9c708358: am 37cedce1: Merge "Add an aapt option to allow string ↵Eric Fischer2010-09-231-4/+78
|\ \ | |/ | | | | | | | | | | | | | | variations for different devices." into gingerbread Merge commit '9c70835896b6c078ac4c8b2e30cb6cfba70bb9d7' * commit '9c70835896b6c078ac4c8b2e30cb6cfba70bb9d7': Add an aapt option to allow string variations for different devices.
| * Add an aapt option to allow string variations for different devices.Eric Fischer2010-09-231-4/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --product option to aapt is a comma-separated list of characteristics of the device being built for. For example, --product nosdcard,grayscale for a device with no SD card and a grayscale screen. Strings can specify a product="characteristic" option to cause that version of the string to be used only for that type of device. All such strings should also specify, at the end of the block, product="default", which will be used if none of the variations match. For example: <string name="choose" product="bw">Choose black or white</string> <string name="choose" product="grayscale">Choose a shade of gray</string> <string name="choose" product="default">Choose a color</string> The default characteristic will also be used when no --product option is specified. Change-Id: Ie6c1505599e02e15b7818e8be6ec47bc6ce71aaa
* | 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
* Add error checking for translatable stringsKenny Root2010-06-031-8/+27
| | | | | | | | | Translatable strings that have multiple substitutions should use positional String.format() substitutions. This change makes it an error not to use that format on translatable strings that have more than one substitution in its text. Change-Id: I3a19707f3804aa24e8568dc1653a11576cac5916
* Use correct API version for UTF-8 checkingKenny Root2010-03-241-1/+1
| | | | | | | | Use the constant for checking the API version in aapt instead of a bare number. Bug: 2541326 Change-Id: Ice7af7b393363a00f1832dd84753b8138d057fb4
* Fix minSdkVersion scanning to not throw warningsKenny Root2010-03-181-3/+5
| | | | | | | | | | | | | | For the UTF8/UTF16 switch code, we needed to know what was the minSdkVersion specified as early as possible. Unfortunately, this threw warnings when the SDK was compiling since we always set this field in the Bundle. This splits out the field used by the initial AndroidManifest.xml scan to a separate one that we won't attempt to re-insert into the AndroidManifest.xml This also switches the logic to better reflect the preference of UTF-8 over UTF-16; previously UTF-16 was the default. Change-Id: Ia81f6b21047043ebb711eb24c2c3718534979ef6
* Revert "Dedupe resource config pointers"Kenny Root2010-03-101-167/+2
| | | | This reverts commit 7b467d8b44c00d14590c021928b6a9ad5a36348e.
* Dedupe resource config pointersKenny Root2010-03-091-2/+167
| | | | | | | | | When there are two configs in a StringPool that would match a string ID only keep the more generic entry to save some space. This means that if you have both "es" and "es_US" translations that have the same translation, the string entry would be removed from the "es_US" config. Change-Id: I4d619942d35ddb477e2eabe4437b7f02697c24de
* Add ability for some manifest attributes to reference resources.Dianne Hackborn2010-03-091-0/+14
| | | | | | | | | | | This loosens our restriction on many manifest attributes requiring literal string values, to allow various ones to use values from resources. This is only allowed if the resource value does not change from configuration changes, and the restriction is still in place for attributes that are core to security (requesting permissions) or market operation (used libraries and features etc). Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
* Change an aapt "warning" from "*** " to "**** " (from three to four stars).Ed Heyl2010-03-051-1/+1
| | | | | "*** " (three stars and a space) is the 'magic make error string'; so this change makes it easier to find the real issues/errors in build logs. Besides, other aapt messages are "**** ".
* Change buf size holding integer in ResourceTableKenny Root2010-02-181-1/+1
| | | | | | | A 32-bit integer can be 10 characters long plus a byte for \0 at the end. Change-Id: I58040fe6e1674e78bcc6e07463ff36fb26e280f4
* Introduce special UI modes for night and car usage.Tobias Haamel2010-02-111-2/+10
| | | | | | | | | | | | | | | | | | The device mode is now called ui mode. Furthermore is the order of precedence for the resources now in such a way that the ui mode needs to be specified after the orientation and before the density. The ui mode can be set, like it is done for the locale, as follows: IActivityManager am = ActivityManagerNative.getDefault(); Configuration config = am.getConfiguration(); config.uiMode = Configuration.UI_MODE_TYPE_CAR | Configuration.UI_MODE_NIGHT_ANY; am.updateConfiguration(config); To allow users to disable the car mode and set the night mode the IUiModeManager interface is used. The automatic night mode switching will be added in a separate change.
* Add --auto-add-overlay option to aapt.Xavier Ducrohet2010-02-041-4/+5
| | | | | | | This option allows resources only present in overlays to be added automatically instead of being declared through <add-resource> Change-Id: Iff782311056f6a045193e57d204f7d3413e11b26
* Optional use of UTF-8 strings in resource bundlesKenny Root2009-12-071-3/+7
| | | | | | | | | | | | | | | 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
* doc change: fix broken R.styleable formatting (caused by missing periods). ↵Dirk Dougherty2009-11-031-6/+6
| | | | | | | Adjust table markup. Bug: 2230588 Change-Id: I54545dfd9d26acef567e586cfc916f6b883a4de7
* Fix compilation of add-resource tag.Robert Greenwalt2009-09-021-1/+1
| | | | It used the wrong tag-type to find the end of itself.
* Make it an error to use a bare apostrophe in aapt, and adjust warnings/errors.Eric Fischer2009-09-011-2/+1
| | | | | | | | | | | | | | | | | | In practice, no one ever writes an apostrophe in an aapt string with the intent of using it to quote whitespace -- they always mean to include a literal apostrophe in the string and then are surprised when they find the apostrophe missing. Make this an error so that it is discovered right away instead of waiting until late in QA or after the strings have already been sent for translation. (And fix a recently-introduced string that has exactly this problem.) Silence the warning about an empty span in a string, since this seems to annoy people instead of finding any real problems. Make the error about having a translated string with no base string into a warning, since this is a big pain when making changes to an application that has already had some translations done, and the dead translations should be removed by a later translation import anyway.
* Allow overlays to add resources.Dianne Hackborn2009-08-131-6/+64
|
* Format aapt warnings the same way as other compiler warningsMarco Nelissen2009-07-131-7/+7
| | | | ('warning: ' instead of 'WARNING: ' or 'WARNING ')
* Make aapt Error out when an overlay adds a string.Robert Greenwalt2009-06-091-9/+15
| | | | | | | | Final added check (I think) for 1585775 - not letting overlays add resources. modified: ResourceTable.cpp modified: ResourceTable.h
* Add per-named-item overlay ability in res xml.Robert Greenwalt2009-06-051-5/+16
| | | | | | | | | | | | | | Fixes 1899451. Also errors out if you add a bag via an overlay (which would renumber resources). Note that you can still add elements within the bag as they are not issued resource IDs. So for example you can now modify the framework themes.xml file without copying the entire file. All bag types are now modifable except non-named bag types (how would you address which element to replace?): array string_array integer_array
* Add padding to public.xml to avoid breaking from auto-merges.Dianne Hackborn2009-05-201-5/+116
|
* Implement compatibility support for WRITE_SDCARD permission.Dianne Hackborn2009-05-151-1/+11
| | | | | | | | | | | Now old applications will automatically be granted it. Also renamed it from SDCARD_WRITE to WRITE_SDCARD to be consistent with our other permissions, and re-arranged how we do targetSdkVersion to actually be usuable for this kind of stuff. Note that right now this results in basically all apps being given the WRITE_SDCARD permission, because their targetSdkVersion is not set. I will be dealing with that in a future change.
* Fix 1840639 to support overlays with zz_ZZ.Robert Greenwalt2009-05-081-1/+1
| | | | Everything but strings worked fine before but a new default string would generate a build error.
* AI 144547: Fix change 144342 by making it active only during overlay processing.Robert Greenwalt2009-04-031-2/+5
| | | | | | BUG=1754390 Automated import of CL 144547
* AI 144342: Fix bag (string-array,etc) behavior with overlays.Robert Greenwalt2009-04-021-3/+21
| | | | | | | | | | | | We used to replace elements in the default with elements from the overlay. This change causes us to empty the array first so if the overlay array is smaller we don't end up with elements from the default array showing through at the end of the array. Ex: [A,B,C] and overlay [D] should give [D] but used to give [D,B,C]. BUG=1754390 Automated import of CL 144342
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+3491
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-3491/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+5
|
* auto import from //branches/cupcake/...@127101The Android Open Source Project2009-01-201-3/+2
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-151-13/+19
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-091-2/+1
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-4/+153
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+3333