summaryrefslogtreecommitdiffstats
path: root/tools/aapt/ResourceTable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'themes-exp-2.3.1_r1' of ↵Steve Kondik2011-01-211-1/+11
|\ | | | | | | https://github.com/tmobile/themes-platform-frameworks-base into gigglebeard
| * Merge commit 'android-2.3.1_r1' into themes-exp-2.3.1_r1Josh Guilfoyle2010-12-231-9/+104
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: core/java/android/app/ActivityThread.java core/java/android/content/pm/ApplicationInfo.java core/java/android/content/pm/PackageParser.java core/res/AndroidManifest.xml services/java/com/android/server/PackageManagerService.java services/java/com/android/server/SystemServer.java test-runner/src/android/test/mock/MockPackageManager.java
| * | Updated copyright headers.Josh Guilfoyle2010-11-181-0/+1
| | | | | | | | | | | | Change-Id: I4824be066a98194b4f7fa9a18682bf6701e069a6
| * | Merge commit 'themes/themes-eclair' into themes-2.2_r1Dirk Sigurdson2010-07-041-1/+10
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: api/current.xml core/java/android/app/ActivityManager.java core/java/android/app/ActivityThread.java core/java/android/app/ApplicationContext.java core/java/android/content/Intent.java core/java/android/content/pm/PackageInfo.java core/java/android/content/res/AssetManager.java core/java/android/content/res/Configuration.java core/jni/android_util_AssetManager.cpp media/java/android/media/Ringtone.java services/java/com/android/server/PackageManagerService.java services/java/com/android/server/am/ActivityManagerService.java test-runner/android/test/mock/MockPackageManager.java
| | * \ Merge branch 'themes-1.5r2' into themes-eclairJosh Guilfoyle2009-11-241-1/+10
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: api/current.xml core/java/android/app/ActivityThread.java core/java/android/app/ApplicationContext.java core/java/android/app/Dialog.java core/java/android/app/SearchDialog.java core/java/android/content/Context.java core/java/android/content/Intent.java core/java/android/content/pm/PackageInfo.java core/java/android/content/pm/PackageParser.java core/java/android/content/res/Configuration.java core/java/android/content/res/Resources.java core/java/android/widget/RemoteViews.java core/java/android/widget/TabWidget.java core/java/com/android/internal/os/ZygoteInit.java core/jni/android_util_AssetManager.cpp core/res/AndroidManifest.xml core/res/res/layout/search_dropdown_item_2line.xml core/res/res/layout/select_dialog_item.xml core/res/res/layout/select_dialog_multichoice.xml core/res/res/layout/select_dialog_singlechoice.xml core/res/res/layout/tab_indicator.xml core/res/res/values/attrs.xml core/res/res/values/public.xml core/res/res/values/strings.xml core/res/res/values/themes.xml libs/utils/Android.mk libs/utils/AssetManager.cpp media/java/android/media/RingtoneManager.java services/java/com/android/server/PackageManagerService.java services/java/com/android/server/SystemServer.java services/java/com/android/server/am/ActivityManagerService.java services/java/com/android/server/status/StatusBarService.java tools/aapt/Main.cpp
| | | * | Port over aapt -x related change.Sergey Ten2009-08-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change's SHA: 691558d8716d50a06fb2fb41548d78762f73d787. The change's check in message: Modify aapt tool (on device version ONLY) to provide proper support for -x option. CR: JoshG.
| | | * | Revert "This is a patch I've checked in in the old repo and apparently it ↵Josh Guilfoyle2009-08-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was not ported to devpde01." This checkin introduced aapt changes to build on the device, which are no longer a required part of the flow. This reverts commit 30f0b7eac75e70e8cedce42b614f33ef5c0a5785. CR: Sergey Ten
| | | * | This is a patch I've checked in in the old repo and apparently it was not ↵Sergey Ten2009-07-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ported to devpde01. This is a first scoop of bringing in aapt tool on a device. We just build aapt as a stand-alone executable for both HOST and TARGET platforms. In future release, we plan to re-factor existing code to produce libaapt library (static for HOST and shared for TARGET), to make sure that the functionality implemented by the library would be exposed (via JNI) to the Java layer. That way, we would be able to invoke aapt in-proc from Java code, instead of spawning a separate process. Here is a brief description of the changes: 1. Introduced HOST_LIB compile flag to differentiate HOST and TARGET flavors. 2. Moved ZipFile.cpp and ZipEntry.cpp (libutils) from hostSources to commonSources, DESPITE GOOGLE's COMMENT in Android.mk. 3. Currently, only 3 following commands are supported by aapt on device: - create a compiled resource package (package command); - add new resource to existing package (add command); - remove resource from existing package (remove command).
| | * | | eclair snapshotJean-Baptiste Queru2009-11-131-21/+78
| | | | |
| | * | | donut snapshotJean-Baptiste Queru2009-07-211-19/+157
| | | | |
| | * | | donut snapshotJean-Baptiste Queru2009-05-201-1/+1
| | |/ /
| | * | AI 144950: Manual integration of 144342 and 144547 from donutburger to cupcake.Robert Greenwalt2009-04-071-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bag (string-array, etc) behavior with overlays. 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 final result. Ex: [A,B,C] default with [D] overlay should give [D] but used to give [D,B,C] BUG=1754390 Automated import of CL 144950
* | | | Support changing style parent in overlaysMartin Nordholts2011-01-211-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package overlays makes it possible for vendors to tweak the look of the platform and the applications without touching any platform or application code directly. This makes package overlays an important mechanism in the Android build system. There is currently a limitation that forbids changing the parent of a style. If vendors could change the parent of e.g. ‘CalendarTheme’ from Android’s vanilla ‘Theme’ to ‘VendorTheme’, then vendor specific adjustments could be done without changing any code directly. From looking at the code it can be seen that the parent value of a style is stored temporarily in ResourceTable::Entry::mParent while overlays are gone through in buildResources(), and processed (in ResourceTable::Entry::assignResourceIds()) at first after all overlays have been handled, so there aren’t any obvious reasons why changing parent in an overlay should be forbidden. Change-Id: I5969bb8aab90df437e1967fc504cc0da79107d13
* | | | aapt: Allow raw "%" in unformatted string-arraysJosh Stone2011-01-171-0/+16
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 15fe2cb added format checking for translatable strings, enforcing the use of positional args. This check can be disabled on <string> values with translatable="false" or formatted="false". But they didn't check for those attributes on <string-array>, so some of CM's strings fail when they're not really format strings, just because they contain percent signs. (e.g. brightness widget's "Auto/Dim/40%/100%") So now the formatted/translatable attributes are checked in string-array too, and we can restore our proper percent signs. Change-Id: I88df7b9ae38760be202d9d75e68f707abdbf3d95
* | | 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
* | | 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
* | | 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