Commit Graph

6 Commits

Author SHA1 Message Date
Yurii Zubrytskyi
a577514789 Make StringPiece to be std::string_view alias
Bug: 237583012
Test: build + boot + UTs

Change-Id: I849831f4466d3b9c7ec842b75256e7fcba77a0c0
2022-11-29 21:46:02 -08:00
Greg Kaiser
851c62d45c Grab pointer into array post-resize()
This is a defensive change.  The current code is safe due to the
resize() which happens 30 lines above this one.  However, if that
resize() were to change or disappear, then this code would be
dangerous, as the resize() could potentially cause a reallocation,
and move our memory buffer.

Since it's no additional cost to grab the pointer into the
array after the resize(), we do that.

Bug: 232940948
Test: TreeHugger
Change-Id: I29b6cbeb064c7654eb21d2e42e05a0587604c32b
2022-06-02 05:30:32 -07:00
Jeremy Meyer
56f36e8f2f Move StringPool to libandroidfw
Test: verified affected tests pass
Bug: 232940948
Change-Id: I22089893d7e5013f759c39ce190bec07fa6435db
2022-05-31 23:43:03 +00:00
Mårten Kongstad
24c9aa6541 libandroidfw: move ConfigDescription from aapt2 to libandroidfw
This is to allow idmap2 to access ConfigDescription.

Test: libandroidfw_tests
Test: aapt2_tests
Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
2018-10-08 06:50:22 -07:00
Adam Lesinski
d1ecd7af68 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
2017-02-15 10:50:23 -08:00
Adam Lesinski
da431a22da 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
2017-01-11 17:20:36 -08:00