32e7501a27f0f19bccdf9e91f9b87869c093f695 |
10-May-2017 |
Adam Lesinski <adamlesinski@google.com> |
Fix support for @empty in style resolution If @empty is encountered in XML, do not fallback to searching through the theme. Bug: 36891052 Test: make aapt2_tests Test: bit CtsContentTestCases:android.content.res.cts.TypedArrayTest Change-Id: Ie3bf7b70af9c7913513a1092afd95d26bec5e635
ssetManager2_test.cpp
ttributeResolution_test.cpp
ata/styles/R.h
ata/styles/build
ata/styles/res/layout/layout.xml
ata/styles/res/values/styles.xml
ata/styles/styles.apk
|
ed69ce84bdfa5ba82008a9b66485ef71c953657a |
20-Mar-2017 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Fix mass logspam of ResourceTypes warnings An overlay was incorrectly leaking its own resources into the framework resource package, which caused warnings for every app that tried to access framework resources (all of them). This change skips including any resources that are not overlaying anything (not present in IDMAP). Bug: 36256974 Test: make libandroidfw_tests Change-Id: I8c710af6849bb848938825aacca02799ee96c003
dmap_test.cpp
ata/overlay/overlay.apk
ata/overlay/res/values/values.xml
|
0e25d9ae776053d9186200f2f698faea45313cb6 |
11-Mar-2017 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Search all packages for an identifier In order to allow multiple packages with the same package name, but different package ID, we need to keep searching packages until the resource is found. Bug: 30999713 Test: make libandroidfw_tests Change-Id: If4540e12731ca18a18e9e550a9bf248606a586c5
ata/basic/R.h
ata/feature/AndroidManifest.xml
ata/feature/build
ata/feature/feature.apk
ata/feature/res/values/values.xml
|
edb88a2b94093ddaeb11c3ea4b8e989c6822bff1 |
18-Feb-2017 |
Adam Lesinski <adamlesinski@google.com> |
Merge "Add ResTable_sparseTypeEntry support"
|
c8f71aa67ea599cb80205496cb67e9e7a121299c |
08-Feb-2017 |
Adam Lesinski <adamlesinski@google.com> |
Add ResTable_sparseTypeEntry support Benchmarks on bullhead-userdebug show that there is a negligent performance impact when using sparse entries on a 30% loaded sparse type of 1000 resources. Benchmark Time CPU Iterations ----------------------------------------------------------------------------------- BM_SparseEntryGetResourceSparseLarge 255 ns 254 ns 2751408 BM_SparseEntryGetResourceNotSparseLarge 254 ns 254 ns 2756534 Bug: 27381711 Test: make libandroidfw_tests aapt2_tests Change-Id: I051ea22f2f6b2bc3696e446adc9e2a34be18009f
ndroid.mk
ssetManager2_bench.cpp
enchmarkHelpers.cpp
enchmarkHelpers.h
esTable_test.cpp
parseEntry_bench.cpp
estHelpers.h
ata/sparse/.gitignore
ata/sparse/AndroidManifest.xml
ata/sparse/R.h
ata/sparse/build
ata/sparse/gen_strings.sh
ata/sparse/not_sparse.apk
ata/sparse/res/values-v26/strings.xml
ata/sparse/res/values-v26/values.xml
ata/sparse/res/values/strings.xml
ata/sparse/res/values/values.xml
ata/sparse/sparse.apk
|
d1ecd7af687bcad0f87c37fe33515ff6c5ea0f1d |
23-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager2: Various fixes - Use FileMaps to open Assets (prevents closing of ApkAssets underlying zip) - Implement OpenDir and List methods - Fix issue where DynamicRefTable wasn't properly constructed Test: make libandroidfw_tests Change-Id: Ib21a84e1114d028120744aa3bc1c6eb9d9399fa8
pkAssets_test.cpp
ssetManager2_test.cpp
ata/basic/assets/uncompressed.txt
ata/basic/basic.apk
ata/basic/build
|
929d6517dfd338f0d481dbe6587643d5aef27ec6 |
17-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager2: Add GetResourceId Add ability to lookup a resource by name. Test: make libandroidfw_tests Change-Id: I262ba5ce4c9892458226fbdb44cf21f9877fb92d
ndroid.mk
ssetManager2_test.cpp
esourceUtils_test.cpp
heme_test.cpp
|
0c40524953f3d36a880f91183302a2ea5c722930 |
14-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager2: Add other support methods - Add GetResourceConfigurations() - Add GetResourceLocales() - Add ResolveReference() - Add stub for GetResourceId() - Change LoadedArsc and ApkAssets factory method to return const Test: make libandroidfw_tests Change-Id: Ia797dc9381a523b1a3e7029048a413e544730379
pkAssets_test.cpp
ssetManager2_bench.cpp
ssetManager2_test.cpp
oadedArsc_test.cpp
heme_bench.cpp
heme_test.cpp
ata/basic/R.h
ata/basic/basic.apk
ata/basic/basic_de_fr.apk
ata/basic/basic_hdpi-v4.apk
ata/basic/basic_xhdpi-v4.apk
ata/basic/basic_xxhdpi-v4.apk
ata/basic/res/values/values.xml
|
c6aada9c5789b2777b19c522d3cd5052bbe784a4 |
14-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
LoadedArsc: Support feature splits. Test: make libandroidfw_tests Change-Id: I278273e688da597f4af86dd55f87750501ef8154
oadedArsc_test.cpp
ata/feature/feature.apk
|
90572a4ab8ac393c57e896be3c608e634866ed38 |
27-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
Merge "libandroidfw: Add new support for shared libraries"
|
4832745b84d6a358582f2264d22acacf25e01b07 |
24-Jan-2017 |
Romain Guy <romainguy@google.com> |
Add color mode to activity/window The color mode lets an application request a wide color gamut for a specific window. This will also be used in the future to request HDR. The color mode is currently either default (sRGB) or an undefined wide gamut color space chosen by the platform. These attributes could later be used to choose a specific color space if we deem this important or useful. This change also renames the various "colorimetry" attributes and constants to "color mode" for consistency. These symbols were added in O and can be safely renamed. Test: CtsColorModeTestCases Bug: 32984164 Change-Id: I4d4691dd12dbe3f3aa6a5cf893cff39aa16c739e
onfig_test.cpp
|
c9ba55902123be5abcf2dcda5af9995be0b8d3d8 |
19-Jan-2017 |
Romain Guy <romainguy@google.com> |
Add wide color gamut and HDR resource qualifiers Bug: 32984164 Test: Config_test, AaptConfig_test and aapt2_tests Change-Id: Ie9c82bfe2d36b1d6180ee223250ab5bb2ce90dd4
onfig_test.cpp
|
1f9f11007db09bbbc156965e77b10de82a32a544 |
20-Jan-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Move StringPiece to libandroidfw"
|
d5083f6f6b9bc76bbe64052bcec639eee752a321 |
17-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
Move StringPiece to libandroidfw libandroidfw needs to make use of StringPiece, so move it to libandroidfw and update all code referencing StringPiece in aapt2. Test: make libandroidfw_tests libaapt2_tests Change-Id: I68d7f0fc7c651b048d9d1f5e7971f10ef5349fa1
ndroid.mk
tringPiece_test.cpp
|
fdaa9c58c9c1961862561b260164d380e3b17363 |
18-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
Merge "New implementation of AssetManager/ResTable"
|
383ac409df65269d5fff247a86fa6ac0d90d2863 |
13-Jan-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Merge "Treat Latin American locales specially"
|
da431a22da38f9c4085b5d71ed9a9c6122c6a5a6 |
29-Dec-2016 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Add new support for shared libraries This adds support for shared resource libraries in the new ResTable/AssetManager implementation. The dynamic package map encoded in resources.arsc is parsed and stored with LoadedArsc, and combined to form a resolved table in AssetManager2. Benchmarks show that this implementation is an order of magnitude faster on angler-userdebug (make libandroidfw_benchmarks). Test: libandroidfw_tests Change-Id: I57c80248728b63b162bf8269ac9495b53c3e7fa0
pkAssets_test.cpp
ssetManager2_bench.cpp
ssetManager2_test.cpp
oadedArsc_test.cpp
esTable_test.cpp
heme_test.cpp
ata/lib/AndroidManifest.xml
ata/lib/R.h
ata/lib/build
ata/lib/lib.apk
ata/lib/res/values/values.xml
ata/lib_one/AndroidManifest.xml
ata/lib_one/R.h
ata/lib_one/build
ata/lib_one/lib_one.apk
ata/lib_one/res/values/values.xml
ata/lib_two/AndroidManifest.xml
ata/lib_two/R.h
ata/lib_two/build
ata/lib_two/lib_two.apk
ata/lib_two/res/values/values.xml
ata/libclient/AndroidManifest.xml
ata/libclient/R.h
ata/libclient/build
ata/libclient/libclient.apk
ata/libclient/res/values/values.xml
|
a192a8ced65ceea8bfe44f0eac6a394cbf80d936 |
11-Jan-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Treat Latin American locales specially Due to legacy reasons, Android translations of European Spanish were kept under 'es', while Latin American Spanish translations were kept under 'es-US'. The combination of this, and the new locale preference rules in Nougat, resulted in 'es' winning over 'es-US' for all Latin American locales, since 'es' was a direct ancestor, while 'es-US' was just a fallback. The changes in Nougat had assumed that app developers would put Latin American Spanish translations under 'es-419', but that could create a backward-compatibility problem under older Android versions that did not support three-digit region codes properly. This CL keeps the Nougat logic and its locale parent tree, but special-cases es-US and es-MX to be treated as equivalents of es-419 in cases where they are present and es-419 is not. Bug: 31545805 Bug: 34126460 Test: unit tests are included Change-Id: Iab26f41294587ee044685a5a6560520c7cbb06f7
onfigLocale_test.cpp
|
7ad1110ecd6a840fcd2895c62668828a1ca029c6 |
29-Oct-2016 |
Adam Lesinski <adamlesinski@google.com> |
New implementation of AssetManager/ResTable The multiwindow model and Resources-per-activity model that came in N puts greater demands on AssetManagers. They are created whenever window dimensions change, which can be frequently. There is a need to be able to cheaply create a new AssetManager for each Activity, which shares a lot of underlying state. In order to make the creation of AssetManagers cheap, we need a new implementation of the native AssetManager and ResTable to support immutable representations of APKs. This new data structure/class is ApkAssets. ApkAssets have the same functionality of an AssetManager, except that they operate on a single APK, and they do not do any caching. Once loaded, they are immutable. ApkAssets will be exposed as a Java object, with its implementation in native code. The existing Java StringBlock will be owned by ApkAssets, which means that Strings can be shared across AssetManagers. ApkAssets can be cached by the ResourcesManager. Creating an AssetManager requires only a list of ApkAssets and a configuration. AssetManager2 (named with the suffix '2' for now while transitioning to the new implementation) caches bags that are accessed. Since ApkAssets are expected to be kept around longer, they do more validation of the resource table, which cause slower load times. Measured on an angler-userdebug, loading the framework assets takes 11ms with ApkAssets, and 2ms with the old AssetManager implementation. The tradeoff is that there does not need to be any security checks once an ApkAssets is loaded, and regular resource retrieval is faster. Measured on an angler-userdebug, accessing resource (android:string/ok) with many locales takes 18us with AssetManager2, and 19us with AssetManager (this is per resource, so these add up). Test: make libandroidfw_tests Change-Id: Id0e57ee828f17008891fe3741935a9be8830b01d
ndroid.mk
pkAssets_test.cpp
ssetManager2_bench.cpp
ssetManager2_test.cpp
ttributeResolution_test.cpp
enchMain.cpp
oadedArsc_test.cpp
ain.cpp
estHelpers.cpp
estHelpers.h
estMain.cpp
heme_bench.cpp
heme_test.cpp
ata/styles/R.h
ata/styles/res/values/styles.xml
ata/styles/styles.apk
|
06d3e8fec7e2b29f99d755bee849023d88957953 |
06-Jan-2017 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Revert null check in ApplyStyle The out parameter `out_indices` is expected to be non-null and so the extra null check adds a cost to performance and opens the door to misusing the API by not supplying `out_indices`. Test: make libandroidfw_tests Change-Id: Ie66fd837c5e24ec2838156e7b67f54c15cd27933
ttributeResolution_test.cpp
|
351471f928022fb22a1b19f9e5e647a7901152fd |
12-Dec-2016 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Make tests less flaky Changing any of the test APKs could change resource IDs. The resource IDs are all made public and assigned an ID to avoid this issue. Test: make libandroidfw_tests Change-Id: Idd17c25f4ac86a0ad5b2b8da6f968e5d9b2346c1
plit_test.cpp
ata/basic/basic.apk
ata/basic/basic_de_fr.apk
ata/basic/basic_hdpi-v4.apk
ata/basic/basic_xhdpi-v4.apk
ata/basic/basic_xxhdpi-v4.apk
ata/basic/build
ata/basic/res/values/values.xml
ata/feature/build
ata/feature/feature.apk
ata/feature/res/values/values.xml
|
4c67a475a334e4f65238d439a3339195e03c03be |
11-Nov-2016 |
Adam Lesinski <adamlesinski@google.com> |
Make tests use APKs instead of exploded APKs Tests would expect parts of the APK to be unzipped and maintained. Instead, we now decompress the required files from the test APKs on test setup. This simplifies test maintenance substantially. Test: make libandroidfw_tests && libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data Change-Id: I3d2100af22df913e02401dedcf9842cdb32b2a3b
ndroid.mk
ppAsLib_test.cpp
sset_test.cpp
ttributeFinder_test.cpp
ttributeResolution_test.cpp
yteBucketArray_test.cpp
onfig_test.cpp
dmap_test.cpp
esTable_test.cpp
plit_test.cpp
estHelpers.cpp
estHelpers.h
heme_test.cpp
ata/app/R.h
ata/app/app.apk
ata/app/app_arsc.h
ata/app/build
ata/appaslib/R.h
ata/appaslib/appaslib.apk
ata/appaslib/appaslib_arsc.h
ata/appaslib/appaslib_lib.apk
ata/appaslib/appaslib_lib_arsc.h
ata/appaslib/build
ata/basic/AndroidManifest.xml
ata/basic/R.h
ata/basic/basic.apk
ata/basic/basic_arsc.h
ata/basic/basic_de_fr.apk
ata/basic/basic_hdpi-v4.apk
ata/basic/basic_xhdpi-v4.apk
ata/basic/basic_xxhdpi-v4.apk
ata/basic/build
ata/basic/res/values/values.xml
ata/basic/split_de_fr_arsc.h
ata/basic/split_hdpi_v4_arsc.h
ata/basic/split_xhdpi_v4_arsc.h
ata/basic/split_xxhdpi_v4_arsc.h
ata/feature/AndroidManifest.xml
ata/feature/build
ata/feature/feature.apk
ata/feature/feature_arsc.h
ata/lib/AndroidManifest.xml
ata/lib/R.h
ata/lib/build
ata/lib/lib.apk
ata/lib/lib_arsc.h
ata/lib/res/values/values.xml
ata/overlay/build
ata/overlay/overlay.apk
ata/overlay/overlay_arsc.h
ata/styles/R.h
ata/styles/build
ata/styles/build.sh
ata/styles/layout.xml
ata/styles/resources.arsc
ata/styles/styles.apk
ata/system/R.h
ata/system/build
ata/system/system.apk
ata/system/system_arsc.h
|
f32adf447511d54c2aa0948d3c1ef44d461538ac |
23-Nov-2016 |
John Reck <jreck@google.com> |
Clean up ApplyStyle JNI Bug: 32573798 Mark input uint32_t[] as const. Use Read-only JNI array access for input as it's faster than critical access. Use non-movable arrays for TypedArray so that the address can be resolved and stored, avoiding the need to do JNI array access for the output. Indicies is always non-null, so remove the optional checks. Eliminate unused return value. Benchmark results: twelveKeyInflate 4963us -> 4713us simpleViewInflate 73us -> 60us Test: Device boots, benchmarks show faster Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
ttributeResolution_test.cpp
|
ea7897954f6339dcc2e5af1584f72c6b2ecd7a67 |
10-Nov-2016 |
Adam Lesinski <adamlesinski@google.com> |
Add --testdata flag for easier testing Instead of hardcoding or assuming a path for testdata, allow the testdata path to be specified via the command line. Test: make libandroidfw_tests Change-Id: Ideae880b21c157b70a11bb5a90a94556771aead6
ndroid.mk
ttributeResolution_test.cpp
ain.cpp
estHelpers.cpp
estHelpers.h
|
7a37b74d37ff79e805c9e97d977e07bfec753c5a |
12-Oct-2016 |
Adam Lesinski <adamlesinski@google.com> |
Add tests for attribute resolution - Adds unit tests for attribute resolution. These include some test data resource tables and compiled XML files. - Convert touched files to Google style guide. Test: make libandroidfw_tests Change-Id: Ib3a36061dc874de5f6a266b4e82c0a12ef435f23
ndroid.mk
ttributeFinder_test.cpp
ttributeResolution_test.cpp
estHelpers.cpp
estHelpers.h
ata/.gitignore
ata/styles/AndroidManifest.xml
ata/styles/R.h
ata/styles/build.sh
ata/styles/layout.xml
ata/styles/res/layout/layout.xml
ata/styles/res/values/styles.xml
ata/styles/resources.arsc
|
0358efe4f76f42d9eea91600202a5ab0831d9cef |
17-Oct-2016 |
Adam Lesinski <adamlesinski@google.com> |
Fix race with Asset destruction and printing allocation stats A race could occur when printing the list of Asset allocations for debugging purposes. Each Asset object would insert themselves into a global linked list on construction and remove themselves on destruction. Iterating the list and the insertion/remove operations all acquire a global lock. The race occurs after the Asset subclass destructor runs but before the Asset base class destructor runs, which performs the actual removal from the list. The vtable of the object being destroyed ends up pointing at the base Asset class' vtable, and during the iteration of the global list, a pure virtual method is called leading to an abort, since the wrong vtable is dereferenced. This change moves the insertion/removal of the Asset object into the global list to the concrete class, which adds some maintenance overhead but solves the problem. Bug:31113965 Test: make libandroidfw_tests Change-Id: I1a620897e5e04a8519ee247883bba0719b1fa6f3
ndroid.mk
sset_test.cpp
|
7e5f96f1a37e51164a594930ecc862a94cc8c231 |
14-Jun-2016 |
Roozbeh Pournader <roozbeh@google.com> |
Move matching Tagalog and Filipino to ResourceTypes.cpp Previously, if a mix of "fil" and "tl" resources existed in Resources (from mixing resources from libraries for example), only resources from one or the other would be chosen, resulting in default resources getting surprisingly used. Now, we resolve the equivalent languages at a per-resource levels (breaking ties for the identical code). Also, previously if both "tl" and "fil" resources were present in assets, getLocales() could return a list with duplicate locales. This change removes Filipino duplicates in the return value of AssetManager::getLocales(). Finally, there was a bug in the replacement of "tl" with "fil" that considered any locale starting with the letter "tl" to be Tagalog. This failed in case of various languages, including Klingon ("tlh") and Tlingit ("tli"). It's now fixed. Bug: 29073000 Change-Id: I0e8b9ae337ced2e640a2575897948c4c5ca307d3
onfigLocale_test.cpp
|
8ac51d14b614ba6a12df2ba90d50a01f50d548aa |
10-May-2016 |
Adam Lesinski <adamlesinski@google.com> |
Resource shared libraries: fix theme references Theme values that would reference other theme values would not work if they were declared in a shared library. We now introduce a parallel resource type to TYPE_DYNAMIC_REFERENCE, TYPE_DYNAMIC_ATTRIBUTE, which allows us to lookup and resolve theme value references from shared libraries. Bug:28687378 Change-Id: I4f2364e3e8b567679f90784fcaaea12b6b05e926
esTable_test.cpp
ata/lib/R.h
ata/lib/lib_arsc.h
ata/lib/res/values/values.xml
|
7134ce35406f942dd640a95583430b39e770f0da |
07-Apr-2016 |
Shammi Khattar <skhattar@codeaurora.org> |
ZipUtils: Fix wrong timestamps when getEntryInfo "tm_mon" format should align with "ZipEntry::setModWhen" in aapt. "tm_isdst" should be initialized, or it will because random value and cause error in function mktime(). BUG:28021145 (cherry picked from commit bb0eb3f4cb33c077b296a18555a9a1a966ff696b) Change-Id: Ia39cf63fcd4bb39c24af080562960279106f526c
ipUtils_test.cpp
|
b7e1ce07756aaca829828c2053eca0d66dd4d440 |
12-Apr-2016 |
Adam Lesinski <adamlesinski@google.com> |
Optimize ResTable::getLocales() to improve bindApplication performance Change from linear searching for uniqueness to binary search. Bug:27198799 Change-Id: I1ccb6e93cc213810848f07d631d9d8de7c719803
esTable_test.cpp
estHelpers.h
ata/system/R.h
ata/system/res/values-sv/values.xml
ata/system/system_arsc.h
|
98e80076c6c4e31f04c580c8774eeea4036d32c1 |
15-Apr-2016 |
Tim Murray <timmurray@google.com> |
Revert "Optimize ResTable::getLocales() to improve bindApplication performance" This reverts commit 5520581b5f043fb858b5b2044ff33ad8545a6d38. bug 28189634 Change-Id: I2d2b859f6d9bd44434fa901cce990583f514980c
esTable_test.cpp
estHelpers.h
ata/system/R.h
ata/system/res/values-sv/values.xml
ata/system/system_arsc.h
|
5520581b5f043fb858b5b2044ff33ad8545a6d38 |
12-Apr-2016 |
Adam Lesinski <adamlesinski@google.com> |
Optimize ResTable::getLocales() to improve bindApplication performance Change from linear searching for uniqueness to binary search. Bug:27198799 Change-Id: Ifa4672929df286c4693ab1f77716f08945941b0c
esTable_test.cpp
estHelpers.h
ata/system/R.h
ata/system/res/values-sv/values.xml
ata/system/system_arsc.h
|
ff5808d223d6359448afc532717b8ccfdc5182d8 |
24-Feb-2016 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager: Cache a pre-filtered list of configurations When we set the parameters for a ResTable, we can pre-filter which resources match and only look at that smaller list when getting entries. This helps A LOT with types that have many configurations, like strings and all their various locales. We must store the cached entries in a parallel data structure because parts of the main Type object are shared with other ResTables, causing data races. Bug:25499111 Change-Id: I63e37dcbd683fc9f1e7d0f3a6ed4c1c01e0fc575
esTable_test.cpp
ata/basic/R.h
ata/basic/basic_arsc.h
ata/basic/res/values-vs/values.xml
ata/basic/split_de_fr_arsc.h
ata/basic/split_hdpi_v4_arsc.h
ata/basic/split_xhdpi_v4_arsc.h
ata/basic/split_xxhdpi_v4_arsc.h
|
7960898f6f886aadda1dd3d7a89106dde9f44217 |
04-Mar-2016 |
Roozbeh Pournader <roozbeh@google.com> |
Fix script-related parts of locale resource matching Previously, a bit was kept to find if the script of a locale was explicitly "provided" in a resource. This was not backward compatible, and failed in some edge cases when the package was created with older versions of AAPT that did not set the bit. The cases would happen when the old resource had an explicit script specified in its locale, but since the "provided" bit was not set in the package, we would assume that the script was computed by us. This CL replaces the "provided" bit with a "computed" bit, so the default value of the bit (set to "false" for old packages) would be correct. Bug: 27156990 Change-Id: I99e7f1ad8f70c90e25ab3640ed34cc1a6f8d1d64
onfigLocale_test.cpp
|
4de4596ac1175908657f29cdc2a56529f2ca4b25 |
12-Feb-2016 |
Roozbeh Pournader <roozbeh@google.com> |
Fix locale matching algorithm for resources We get ResTables two different ways: one is from AAPT, another from settings-based requests from the Java side. In the settings-based requests, localeScript will be autocomputed, but for AAPT-filled tables (especially if they come from older versions of AAPT), we need to compute the script. Previously, locales that came from packages were incorrectly assumed to have "undeterminable" scripts, rather than "undetermined" scripts. This led to us mistakenly falling back to the old logic of requiring the locales' countries to match, rather than just looking at computed scripts. Bug: 27157452 Change-Id: Id7e346d3ecfb17273ffb63de5bcb4849a6eafbbd
onfigLocale_test.cpp
|
27953c349fa1c46698f57ae5f26339560c21adac |
01-Feb-2016 |
Roozbeh Pournader <roozbeh@google.com> |
Make default resources a better match for en-US requests When locale fallback landed, resources which specified an 'English' locale started to be considered a better match for en-US, even though traditionally, apps tend to ship US English resources under their default locale. This fixes that, and makes en-US requests match default locales. Bug: 26756573 Bug: 26789680 Bug: 26803868 Change-Id: I460c276bfc6ddba0439dcdf87497a0aece0fa05d
onfigLocale_test.cpp
|
b927c559e1ef8530b08712507f320502627db298 |
15-Jan-2016 |
Roozbeh Pournader <roozbeh@google.com> |
Implement smarter locale resource selection * Add support for determining script from language and region. * Add support for determining special parents of locales. * Add support for smart comparison of locales with only a difference in region, using the locale parentage tree. * Fix LocaleData.matchScore() to not fallback to old locale matching behavior if we can't determine a script. * Allow four-character variant codes. (Previously, only five- to eight-character variant codes were allowed.) Bug: 7296673 Bug: 26589793 Change-Id: Ibde0a48c0564ff383b41068095a5cbacfe7b94bc
onfigLocale_test.cpp
|
1375e5f180c1e42c9f4d8c51531935b0449b8ed3 |
06-Nov-2015 |
Tao Bai <michaelbai@google.com> |
Add test to cover loading shared-lib with appAsLib as true. This patch made AppAsLib_test use its own resource Bug 22487604 Change-Id: Iac4cc949f1b25c326a287a49e0b031bf6831e9e9
ppAsLib_test.cpp
ata/appaslib/AndroidManifest.xml
ata/appaslib/R.h
ata/appaslib/appaslib_arsc.h
ata/appaslib/appaslib_lib_arsc.h
ata/appaslib/build
ata/appaslib/res/values/values.xml
|
a6d7e3fb9c9233b9ae46b702d17433854c43d6a0 |
02-Sep-2015 |
Tao Bai <michaelbai@google.com> |
Load app resource as shared library. - Added aapt command line flag --app-as-shared-lib to build app resources that could be loaded as shared lib at runtime. - Added new method AssetManager.addAssetPathAsSharedLibrary() to load an app resource as shared library. Bug 22487604 Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
ndroid.mk
ppAsLib_test.cpp
ata/appaslib/R.h
|
598319d01743427aa67faf4f54ae6d837c8c6d2e |
14-Aug-2015 |
Dan Albert <danalbert@google.com> |
am 16e5aba9: am 4a2a890b: Merge "Fix mismatched new[]/delete." * commit '16e5aba9c8157b3ffdcdceda378896a43f074748': Fix mismatched new[]/delete.
|
8dc8313c3e5781dfd65915da453ebad1561a7cb9 |
14-Aug-2015 |
Dan Albert <danalbert@google.com> |
Fix mismatched new[]/delete. The new clang will emit a warning for this. Change-Id: Ie0edc46461eb5edb2a7ad33a3a7f6cef2d825c36
ackupData_test.cpp
|
2738c96d998dedfae5b4670d588d0cd299c4ca0f |
14-May-2015 |
Adam Lesinski <adamlesinski@google.com> |
Add -round and -notround qualifier to android runtime/aapt The round qualifier denotes a device with a screen shape that is round. The qualifier shows up after the 'long/notlong' qualifier and before the orientation 'port/land/square' qualifiers. Change-Id: I3044258b2703a9165694b79725bade770fa6cea1
onfig_test.cpp
|
1b4f316651096f0ef9301b4ffde4816a08a54ab5 |
08-Apr-2015 |
Dan Albert <danalbert@google.com> |
Fix UB in ResourceTable::stringToInt. Was here because UBsan found integer overflow in the parsing for hex numbers, since hex numbers here are actually unsigned but assigned to a signed integer. Also fixes a number of missing error conditions. Change-Id: Iaea576daedfc6c75521cde02de3fe9dd0198a3b7
ndroid.mk
esTable_test.cpp
|
347040cf84401601b0d5cbb1d76e4648d1c8a461 |
11-Dec-2014 |
Adam Lesinski <adamlesinski@google.com> |
am 740acf21: am c7801877: Merge "Fix issue where non-resource attributes would cause obtainStyleAttributes to fail" into lmp-mr1-dev * commit '740acf213c56c406132294790fa2fadd0380cfa7': Fix issue where non-resource attributes would cause obtainStyleAttributes to fail
|
5dce5e67dbdcd14882edf3f64fba671c77577ee4 |
10-Dec-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix issue where non-resource attributes would cause obtainStyleAttributes to fail A sentinal value of 0x00000000 was used to mark the first time an AttributeFinder was used. If the resource ID of an attribute was also 0x00000000 (which occurs with non-resource attributes, like 'style'), then it would be mistaken as the sentinel start value. Bug:18421787 Change-Id: I4be353e0f8c940cb6f262d155129f048dcc444ae
ttributeFinder_test.cpp
|
11bdd5b10b5f921b657283fa94463263171218d5 |
17-Nov-2014 |
Adam Lesinski <adamlesinski@google.com> |
Merge commit '06d8b7b8' into manualmerge Conflicts: core/jni/android_util_AssetManager.cpp Change-Id: I77b72d0d3ec8184ccd97419e4c76b7d55b1a52ca
|
dc9c109af815100d497184e6dadebceed7f3bf1d |
08-Nov-2014 |
Andreas Gampe <agampe@google.com> |
resolved conflicts for merge of 487ae9b8 to lmp-mr1-dev-plus-aosp Change-Id: I395f184d885a7ef30aa113ab01fcaacc94243008
|
2204f0bf56af53b588a01701b8cf9cd05b1b3ff9 |
22-Oct-2014 |
Andreas Gampe <agampe@google.com> |
Frameworks/base: Wall Werror in libs/androidfw Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor some code. Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
ndroid.mk
|
a7d1d73a477fe512d9ea69ee2883084630ec24c4 |
02-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
Implement back-tracking when searching for attributes in XML or resource bag Shared libraries have their package ID assigned at run-time, so some of the guarantees we used to have about sort order of attributes in bags or XML elements no longer hold. This CL adds back-tracking and can jump to the nearest attribute with the same package ID and continue searching. This means that attributes with the same package ID must be sorted by increasing resource ID, as was the case before. Attributes with the same package ID must be grouped together, but the groups can be in any order. Ex: 0x02010001, 0x02010002, 0x01010000, 0x01010010, 0x7f010032 Bug:17666947 Change-Id: I9c198bbb6ca788849aac85b6323606ea5d9550d6
ndroid.mk
ttributeFinder_test.cpp
|
3fd340028fc24198edb23ddf5eb5a0a100bab745 |
04-Nov-2014 |
Adam Lesinski <adamlesinski@google.com> |
Merge commit '78be0498' into manualmerge Conflicts: libs/androidfw/ResourceTypes.cpp tools/aapt/Android.mk tools/aapt/StringPool.cpp tools/aapt/StringPool.h Change-Id: I9d69efdfb892032895ace12159d193304f02dc6c
|
668f0a356cba44c22d8ca0c9f4711613885d46a9 |
04-Nov-2014 |
Adam Lesinski <adamlesinski@google.com> |
Merge "Fix issues that will be present in C++11" into lmp-mr1-dev
|
4bf58108d442b37ab4adf5ce3a4ecd63472ce254 |
03-Nov-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix issues that will be present in C++11 - char16_t is a distinct type, so stay consistent with it throughout the code base. - char16_t is defined as minimum size of 16 bits. Since we mmap and cast data structures onto raw memory, we need a precise definition (uint16_t), so we cast between that (and static_assert that they are the same size). Change-Id: I869c32637543bbcfb39d2643e7d9df10d33acd3c
ndroid.mk
|
d75d3eb5e423fbcc069dd3c40a4a5eeeaf8bcdab |
28-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
am 31b76b66: Merge "libandroidfw: Do not build device library when building SDK" into lmp-mr1-dev automerge: 06caf1b * commit '06caf1b1112a6a3e364a46d02b883451e9180a07': libandroidfw: Do not build device library when building SDK
|
f001e37b316a0d5b9c9eda08bbe53ea4b06562a3 |
21-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Do not build device library when building SDK Building the windows SDK causes a build failure if the device libandroidfw target is not omitted. Change-Id: I587b166342d0d047820911d279f192d2b39b6263
ndroid.mk
|
705f2ac42412c8a5a436f0044b84ebbcd1e9c729 |
24-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
am 879f237a: Merge "Added some more Split density tests" into lmp-mr1-dev automerge: 93b43445 * commit '93b434451abd11ff58ada66abdcddb3f33bb5023': Added some more Split density tests
|
60293197379e522c870c4a28462804207bab505d |
22-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
Added some more Split density tests Change-Id: I3b83515f1240e713bbcff5385cf054bba693f297
ndroid.mk
esTable_test.cpp
plit_test.cpp
estHelpers.cpp
estHelpers.h
ata/app/R.h
ata/app/build
ata/app/res/values/values.xml
ata/basic/R.h
ata/basic/basic_arsc.h
ata/basic/build
ata/basic/res/layout-fr-sw600dp/main.xml
ata/basic/res/layout/main.xml
ata/basic/res/values-de/values.xml
ata/basic/res/values-fr/values.xml
ata/basic/res/values-hdpi/values.xml
ata/basic/res/values-sv/values.xml
ata/basic/res/values-xhdpi/values.xml
ata/basic/res/values-xxhdpi/values.xml
ata/basic/res/values/values.xml
ata/basic/split_de_fr_arsc.h
ata/basic/split_hdpi_v4_arsc.h
ata/basic/split_xhdpi_v4_arsc.h
ata/basic/split_xxhdpi_v4_arsc.h
ata/feature/build
ata/feature/feature_arsc.h
ata/feature/res/values/values.xml
ata/lib/R.h
ata/lib/build
ata/lib/lib_arsc.h
ata/lib/res/values/values.xml
ata/overlay/build
ata/overlay/res/values/values.xml
ata/system/R.h
ata/system/build
ata/system/res/values/themes.xml
|
97ce1a6a23bdb4213303384c6cf73b43cce6aa8f |
10-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
am 983b668b: am be003a35: am f23e3ea6: am aeef612f: Merge "Search all packages for a given type string when looking up resources by name" into lmp-dev * commit '983b668bd8deb58cbd3faabb931c4fb2dd80bf2f': Search all packages for a given type string when looking up resources by name
|
73587de15470ecf04cf9c90bb3c1f603afbc7855 |
09-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
am aeef612f: Merge "Search all packages for a given type string when looking up resources by name" into lmp-dev * commit 'aeef612f200b6b5cee214230271e1c3d718151ee': Search all packages for a given type string when looking up resources by name
|
e60a87f5529b2867ba3f4e60b39d7b47b67f8ca3 |
09-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
Search all packages for a given type string when looking up resources by name Previously we would stop at the first match when looking for a type string, but we should search all packages in case a feature Split added a type with the same name. Bug:17924027 Change-Id: I6bc7ef073324db99448538cd8bdf566658f066ff
plit_test.cpp
|
5648b12da1357345b06ff86d41ff70a92d803093 |
20-Sep-2014 |
Dan Albert <danalbert@google.com> |
resolved conflicts for merge of 8791ebf0 to lmp-mr1-dev-plus-aosp Change-Id: Ifedb15de5a4db6cb0238fec93aaa2d95f1844694
|
ece13f90ed7d5cd4d025af34a6651cd32c2cbaf3 |
20-Sep-2014 |
Dan Albert <danalbert@google.com> |
resolved conflicts for merge of 8791ebf0 to lmp-dev-plus-aosp Change-Id: I9d0f81003f84d03a7a67420dd496fde18dd654d4
|
82a2dd8efe48d3a4e04655f01329da857ace4b7d |
18-Sep-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix backwards compat problem with AAPT public attrs AAPT has traditionally assigned resource IDs to public attributes, and then followed those public definitions with private attributes. --- PUBLIC --- | 0x01010234 | attr/color | 0x01010235 | attr/background --- PRIVATE --- | 0x01010236 | attr/secret | 0x01010237 | attr/shhh Each release, when attributes are added, they take the place of the private attributes and the private attributes are shifted down again. --- PUBLIC --- | 0x01010234 | attr/color | 0x01010235 | attr/background | 0x01010236 | attr/shinyNewAttr | 0x01010237 | attr/highlyValuedFeature --- PRIVATE --- | 0x01010238 | attr/secret | 0x01010239 | attr/shhh Platform code may look for private attributes set in a theme. If an app compiled against a newer version of the platform uses a new public attribute that happens to have the same ID as the private attribute the older platform is expecting, then the behavior is undefined. We get around this by detecting any newly defined attributes (in L), copy the resource into a -v21 qualified resource, and delete the attribute from the original resource. This ensures that older platforms don't see the new attribute, but when running on L+ platforms, the attribute will be respected. We still need to address this problem in the platform moving forward, as this will only help us in the transition from pre L to L. Bug:17520380 Change-Id: Ia2a985798b50006c21c7c3431d30d9598f27cd91
ata/basic/build
|
715d01aedf7e789a37f7aac8f41827bfddcc0634 |
09-Sep-2014 |
Dan Albert <danalbert@google.com> |
Clean up test makefiles. The build system takes care of linking the correct STL and gtest libraries for you, and specifying them manually confuses the build system when using libc++. Change-Id: I9f76ab26a63ace51293614cfb5ca002f37438e02
ndroid.mk
|
9d9cc6233c7035c32d3b8622aa5dc7d413193dc7 |
29-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Add test to ensure themes get copied from separate resource tables Change-Id: I94e9966cf1e9d0e7e6c7daa0606a87bb0f67705e
ndroid.mk
heme_test.cpp
ata/app/AndroidManifest.xml
ata/app/R.h
ata/app/app_arsc.h
ata/app/build
ata/app/res/values/values.xml
ata/system/AndroidManifest.xml
ata/system/R.h
ata/system/build
ata/system/res/values/themes.xml
ata/system/system_arsc.h
|
d79e33379d56e20b7dd67baa992409b72a335ded |
29-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Clean up test allocations so real memory leaks are more visible Change-Id: Ic405f08c8d8e3e7fc4e4a991671e980752c19899
ackupData_test.cpp
bbFile_test.cpp
|
31245b4f06003f1c8cd44c31b387c96ab4e282f9 |
23-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Introduce anydpi density resource qualifier 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
ndroid.mk
onfigLocale_test.cpp
onfig_test.cpp
esourceTypes_test.cpp
estHelpers.h
|
2cb761e3ddb9d68ab430013e9cd15ecaab9fbc62 |
15-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix assumption about DynamicRefTable in aapt Packages without any resources should not expect to have a DynamicRefTable. Bug:16895517 Bug:17056720 Change-Id: Id006f6bdbf08f30505f6ba5982bc9d1b09db0f0a
esTable_test.cpp
|
18560886cbb7825c1bb034c96e5d0cd4dbdbb8ee |
15-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Revert "Fix aapt dump for APKs with no resources" This reverts commit 0e475302cd196f45a01a525c49089018b238d4ba. I'll re-upload this CL with the correct fix in LoadedApk. Change-Id: I17c6381f8e5907dab9f996f89c5d435b9c08a13a
esTable_test.cpp
|
e23a91e2bdab06e3c0c64201e88e50ab76c6b74b |
14-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix aapt dump for APKs with no resources 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
esTable_test.cpp
|
ccf25c7bf69eb8c04246e3f79da31b52c2922a80 |
09-Aug-2014 |
Adam Lesinski <adamlesinski@google.com> |
Fix shared library bug in bag attributes 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
dmap_test.cpp
esTable_test.cpp
plit_test.cpp
ata/R.h
ata/basic/R.h
ata/lib/AndroidManifest.xml
ata/lib/R.h
ata/lib/build
ata/lib/lib_arsc.h
ata/lib/res/values/values.xml
|
833f3ccbc8f4dd1ec8abb9121988b99ff34ec4c1 |
19-Jun-2014 |
Adam Lesinski <adamlesinski@google.com> |
AAPT support for feature splits 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
dmap_test.cpp
esTable_test.cpp
plit_test.cpp
ata/R.h
ata/basic/basic_arsc.h
ata/basic/build
ata/basic/res/layout-fr-sw600dp/main.xml
ata/basic/res/layout/main.xml
ata/basic/res/values-de/values.xml
ata/basic/res/values-fr/values.xml
ata/basic/split_de_fr_arsc.h
ata/feature/AndroidManifest.xml
ata/feature/build
ata/feature/feature_arsc.h
ata/feature/res/values/values.xml
ata/split_base_arsc.h
ata/split_de_fr_arsc.h
|
b2975916224caecfc2fbb84e71ebd625ce6eeb1c |
30-Jun-2014 |
Narayan Kamath <narayan@google.com> |
Fix packing of values at offset 16. 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
esourceTypes_test.cpp
|
c7400b0ce66e916cf8be239c26cd5acbd15ef745 |
01-Jul-2014 |
Narayan Kamath <narayan@google.com> |
am 8c1c0a68: am 7f319c47: am 1dc550fa: Merge "Fix packing of values at offset 16." * commit '8c1c0a6881b1507f9ae25d753b64de185a7615b2': Fix packing of values at offset 16.
|
f90f2f8dc36e7243b85e0b6a7fd5a590893c827e |
06-Jun-2014 |
Adam Lesinski <adamlesinski@google.com> |
Support multiple resource tables with same package 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
ndroid.mk
yteBucketArray_test.cpp
dmap_test.cpp
esTable_test.cpp
esourceTypes_test.cpp
plit_test.cpp
estHelpers.h
ypeWrappers_test.cpp
ata/.gitignore
ata/basic/AndroidManifest.xml
ata/basic/basic_arsc.h
ata/basic/build
ata/basic/res/values-sv/values.xml
ata/basic/res/values/values.xml
ata/overlay/AndroidManifest.xml
ata/overlay/build
ata/overlay/overlay_arsc.h
ata/overlay/res/values/values.xml
ata/split_base_arsc.h
ata/split_de_fr_arsc.h
|
de898ff42912bd7ca1bfb099cd439562496765a4 |
30-Jan-2014 |
Adam Lesinski <adamlesinski@google.com> |
Shared library resource support 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
bbFile_test.cpp
|
788fa41482b9d398591b7db8b0b01839029611ad |
21-Jan-2014 |
Narayan Kamath <narayan@google.com> |
Extended locales in AAPT / AssetManager. 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
esourceTypes_test.cpp
|
48620f1d1b03e1cb4e0dce4999e0a4c2daf3a1b2 |
20-Jan-2014 |
Narayan Kamath <narayan@google.com> |
AssetManager support for 3 letter lang/country codes. - 3 letter codes are packed into the existing 32 bit locale field in ResTable_config - We introduce new fields for script / variant information. Note that we define a "match" between two ResTable_config structures to be purely on the basis of their language & country (disregarding the script and the variant). However, configs with scripts and variants are considered to be more specific than those without. (cherry picked from commit 378c6775a62d9c461cde51f06c1b14bb014c78fd) Change-Id: I7dce82a3fe2412834252723f458826ae41535a78
ndroid.mk
esourceTypes_test.cpp
|
91447d88f2bdf9c2bf8d1a53570efef6172fba74 |
21-Jan-2014 |
Narayan Kamath <narayan@google.com> |
Extended locales in AAPT / AssetManager. 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
esourceTypes_test.cpp
|
378c6775a62d9c461cde51f06c1b14bb014c78fd |
20-Jan-2014 |
Narayan Kamath <narayan@google.com> |
AssetManager support for 3 letter lang/country codes. - 3 letter codes are packed into the existing 32 bit locale field in ResTable_config - We introduce new fields for script / variant information. Note that we define a "match" between two ResTable_config structures to be purely on the basis of their language & country (disregarding the script and the variant). However, configs with scripts and variants are considered to be more specific than those without. Change-Id: I3c2e909ebbebdbbd0ab72a639d531b2b9fdbd9b9
ndroid.mk
esourceTypes_test.cpp
|
560566d2915c03bed338fc532ac7f7aa3620cfdf |
03-Dec-2013 |
Narayan Kamath <narayan@google.com> |
Reimplement ZipFileRO in terms of libziparchive. This lets us share zip archive processing code with both the runtime (Art, dalvik) and critical java code (StrictJarFile). This change also moves several utility methods to ZipUtils and dedups code across several zip inflation methods. One of the side effects of this change is that several processing loops are now O(n) instead of O(n^2). bug: 10193060 (cherry picked from commit afd31e08299008fdc5c2813f21b2573f29dc53df) Change-Id: Iae67e62f1dc6dfc3f43e29bc38e3ffd1cb14d191
ndroid.mk
ipFileRO_test.cpp
ipUtils_test.cpp
|
16c4d154dca43c662571129af31b27433b919a32 |
24-Jan-2014 |
Adam Lesinski <adamlesinski@google.com> |
Revert "move libandroidfw to frameworks/native" This reverts commit 84b6292c33d71b5739828d08aa8101d1954577f2.
ndroid.mk
ackupData_test.cpp
bbFile_test.cpp
ipFileRO_test.cpp
|
afd31e08299008fdc5c2813f21b2573f29dc53df |
03-Dec-2013 |
Narayan Kamath <narayan@google.com> |
Reimplement ZipFileRO in terms of libziparchive. This lets us share zip archive processing code with both the runtime (Art, dalvik) and critical java code (StrictJarFile). This change also moves several utility methods to ZipUtils and dedups code across several zip inflation methods. One of the side effects of this change is that several processing loops are now O(n) instead of O(n^2). bug: 10193060 Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
ndroid.mk
ipFileRO_test.cpp
ipUtils_test.cpp
|
84b6292c33d71b5739828d08aa8101d1954577f2 |
03-Oct-2013 |
Mike Lockwood <lockwood@google.com> |
move libandroidfw to frameworks/native Change-Id: Ic5b8a2742c7141156ab0f00ca29097bfe92bce60
ndroid.mk
ackupData_test.cpp
bbFile_test.cpp
ipFileRO_test.cpp
|
fd5f566db84722f9cf54085d8a378e9398ef260d |
19-Sep-2013 |
Chris Wren <cwren@android.com> |
add a test for BackupData helpers. Bug: 10821481 Change-Id: I3e28123d36927ae4a22d26378b8bf1cd4e87cfd2
ndroid.mk
ackupData_test.cpp
|
9d3b1a424c5c61e24e9659d15fb353026a00d925 |
02-Jul-2013 |
Jeff Brown <jeffbrown@google.com> |
Move input library code to frameworks/native. No longer compile libandroidfw as a static library on the device since it already exists as a shared library. Keeping the static library would force us to provide a static library version of libinput for the device as well which doesn't make sense. Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
ndroid.mk
nputChannel_test.cpp
nputEvent_test.cpp
nputPublisherAndConsumer_test.cpp
estHelpers.h
|
1f5762e646bed2290934280464832782766ee68e |
07-May-2013 |
Mathias Agopian <mathias@google.com> |
libutils clean-up Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
ndroid.mk
ipFileRO_test.cpp
|
f0771b192c5530681ca407bdf3c1b21fd519c897 |
02-Oct-2012 |
Kenny Root <kroot@google.com> |
am cee11240: am 07b4339b: Merge "Change androidfw tests to native test target" * commit 'cee1124052202c7f2a1956a54e5aa538d82197a7': Change androidfw tests to native test target
|
f3f286df4d79834ec350bdc18d01acd51f4791e1 |
02-Oct-2012 |
Kenny Root <kroot@google.com> |
Change androidfw tests to native test target Change the androidfw tests to the BUILD_NATIVE_TEST target so they end up in the correct directory. Also remove the module tags and C include paths. The include paths are automatically added when the library is used. Change-Id: Ia47f6c25130c5068b89d6dc067e5d9c714a6d08a
ndroid.mk
nputEvent_test.cpp
|
4b447b91debda9c9a0e230cab9e140e356b2a305 |
27-Jun-2012 |
Nick Kralevich <nnk@google.com> |
Add mode when open(O_CREAT) is used. When creating a new file using open(..., O_CREAT), it is an error to fail to specify a creation mode. If a mode is not specified, a random stack provided value is used as the "mode". This will become a compile error in a future Android change. Change-Id: I8635e8b69587ed107253870d991c3fcf563ca876
bbFile_test.cpp
|
771526c88f5cc4b56a41cb12aa06a28d377a07d5 |
28-Apr-2012 |
Jeff Brown <jeffbrown@google.com> |
Resample touch events on frame boundaries. Bug: 6375101 Change-Id: I8774e366306bb2b6b4e42b913525bf25b0380ec3
nputPublisherAndConsumer_test.cpp
|
a982dc05d7ca919c07f50e446549ef9dceadf6bd |
23-Mar-2012 |
Colin Cross <ccross@android.com> |
frameworks/base: move Zip* from libandroidfw to libutils ZipUtils is needed by build/tools, move it from libandroidfw (frameworks/base) to libutils (frameworks/native). Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
ndroid.mk
ipFileRO_test.cpp
|
08965ec67ada98f63f8ac879cc44c8b0e7ff046d |
06-Mar-2012 |
Mathias Agopian <mathias@google.com> |
fixup hardcoded include paths for new project Change-Id: Id443ec5c99bb4d7653905f1be1f72a029e0cf087
nputChannel_test.cpp
nputPublisherAndConsumer_test.cpp
estHelpers.h
|
83c64e6b624a876436d2ef5d2f173b10407e27b4 |
21-Feb-2012 |
Mathias Agopian <mathias@google.com> |
frameworks/base refactoring create the new libandroidfw from parts of libui and libutils Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
ndroid.mk
nputChannel_test.cpp
nputEvent_test.cpp
nputPublisherAndConsumer_test.cpp
bbFile_test.cpp
ipFileRO_test.cpp
|