Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fbcde60f authored by sangyun's avatar sangyun Committed by Sangyun Yun
Browse files

Reduce resource cache size and use LruCache

 android.util.LruCache provides least recent used algorithm and has
an advantage of not calculating the size every time to find eldest
value of LinkedMap. So changed from LinkedMap to LruCache.
 Size of key configuration, package name, and value Resource are
about 300 bytes per one item on average, so even if the cache has
1000 items, it does not use that much heap memory. And the
Configuration is logically hard to exceed 1000 types, so it can be
considered large enough.

Bug: 289045241
Test: atest CtsTelephonyTestCases
Test: atest CellBroadcastServiceTests
Test: atest GoogleCellBroadcastReceiverUnitTests
Test: manually perform telephony tests and validty checks
Change-Id: I606013e0a5a69355cdaa9453842ca63fd08d1126
parent c993acbf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment