bebfcc46a249a70af04bc18490a897888a142fb8 |
|
12-Feb-2018 |
Adam Lesinski <adamlesinski@google.com> |
Refactor AssetManager Bug: 64071469 Test: atest CtsContentTestCases Change-Id: Ia6856157e8813856268fba003e1e591d690cb26e
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
ec7f06cc372a7298c85bf96cb4133d7dc8807419 |
|
09-Feb-2018 |
Adam Lesinski <adamlesinski@google.com> |
Revert "AssetManager2: Fix list function" This reverts commit adc0b87ec235a71d722fb8d6aad50ceaeac8c6d5. Bug:73134570 Change-Id: I9e652245e7661eb7a34dadb5f363a08bc8c9e57e
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
adc0b87ec235a71d722fb8d6aad50ceaeac8c6d5 |
|
09-Feb-2018 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager2: Fix list function List was skipping directories. Include them, and add tests to ensure the order and precedence is correct. Bug: 72511641 Test: make libandroidfw_tests Test: atest CtsContentTestCases:AssetManagerTest Change-Id: Iadf45883283d3e4aae93bd7c3343745912e34fa0
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
441500b23ffc4f15d1e2e58da55b37efe9d2ffe1 |
|
14-Nov-2017 |
Adam Lesinski <adamlesinski@google.com> |
libandroidfw: Support loading ApkAssets from a file descriptor Test: make aapt2_tests Change-Id: I041f9e9e3d3f6a10684cbd8baa49f4dda7d6dc40
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
970bd8d2835b05237c4561bd6c12329e26f136b3 |
|
25-Sep-2017 |
Adam Lesinski <adamlesinski@google.com> |
AssetManager2: Implement IDMAP support This enables RRO (runtime resource overlays) with AssetManager2 Test: make libandroidfw_tests Test: out/host/<platform>/nativetest64/libandroidfw_tests/libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data Change-Id: Id8079104faefbfaa3f4017d8f7ee1a8968f151a2
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
03ebac8c68f9925592a172fcfd11d56f48cadaeb |
|
25-Sep-2017 |
Adam Lesinski <adamlesinski@google.com> |
A few fixes to AssetManager2 for compat Theme copying should behave the way it did with the old AssetManager (copy only the framework attributes when copying from a Theme object from a different AssetManager). Cleanup the dependencies on libziparchive in ApkAssets. Test: make libandroidfw_tests Test: out/host/<platform>/nativetests64/libandroidfw_tests/libandroidfw_tests --testdata=frameworks/base/libs/androidfw/tests/data Change-Id: I973f7e6eb14ce311306e2ec66a623a4790c8d233
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
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
/frameworks/base/libs/androidfw/ApkAssets.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
/frameworks/base/libs/androidfw/ApkAssets.cpp
|
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
/frameworks/base/libs/androidfw/ApkAssets.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
/frameworks/base/libs/androidfw/ApkAssets.cpp
|