summaryrefslogtreecommitdiff
path: root/libs/androidfw/Util.cpp
AgeCommit message (Collapse)Author
2025-02-12Revert^2 "[res] Optimize few functions for dtoh() as a noop" Yurii Zubrytskyi
6e4275255688ab4e7a0bc5602f4ba1ee2958cff4 Change-Id: I4f9a92a21d7597eaca5ef69fc67350a25c9859bc
2025-01-08Revert "[res] Optimize few functions for dtoh() as a noop" ESWAR MAGATAPALLI (xWF)
Revert submission 31021037 Reason for revert: Droidmonitor created revert due to b/388342212. Will be verifying through ABTD before submission. Reverted changes: /q/submissionid:31021037 Change-Id: Ibd9504f9ea147e3849a5df4b924c44f9880c69c2
2024-12-19[res] Optimize few functions for dtoh() as a noop Yurii Zubrytskyi
Given that right now our device on disk endianness is exactly the same as the in-memory one, few functions can be optimized into noops or raw memcpy Bug: 319137634 Test: boot + atest libandroidfw_tests Flag: EXEMPT performance optimization Change-Id: I2f048feea7a93fb52434b128aa2905ebf1bb46cb
2022-11-29Make StringPiece to be std::string_view alias Yurii Zubrytskyi
Bug: 237583012 Test: build + boot + UTs Change-Id: I849831f4466d3b9c7ec842b75256e7fcba77a0c0
2022-06-02Grab pointer into array post-resize() Greg Kaiser
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-05-31Move StringPool to libandroidfw Jeremy Meyer
Test: verified affected tests pass Bug: 232940948 Change-Id: I22089893d7e5013f759c39ce190bec07fa6435db
2018-10-08libandroidfw: move ConfigDescription from aapt2 to libandroidfw MÃ¥rten Kongstad
This is to allow idmap2 to access ConfigDescription. Test: libandroidfw_tests Test: aapt2_tests Change-Id: I54210bbbd8dad5903cb7100807df977efa394ad5
2017-02-15AssetManager2: Various fixes Adam Lesinski
- 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-01-11libandroidfw: Add new support for shared libraries Adam Lesinski
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