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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.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
/frameworks/base/libs/androidfw/tests/TestHelpers.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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
60293197379e522c870c4a28462804207bab505d |
|
22-Oct-2014 |
Adam Lesinski <adamlesinski@google.com> |
Added some more Split density tests Change-Id: I3b83515f1240e713bbcff5385cf054bba693f297
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
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
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|
08965ec67ada98f63f8ac879cc44c8b0e7ff046d |
|
06-Mar-2012 |
Mathias Agopian <mathias@google.com> |
fixup hardcoded include paths for new project Change-Id: Id443ec5c99bb4d7653905f1be1f72a029e0cf087
/frameworks/base/libs/androidfw/tests/TestHelpers.h
|