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

Commit d04358ec authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

Fix popular chinese app crashes in new API

Resources.registerResourcePaths() API implementation used to
always create a new asset manager object when updating an
object that could be in use already. This was to prevent a
case when we change the assets mid-high level oepration.

Turns out the other case is more prevalent: when an app
uses the object as a key holding some own resources
customization, and changing the object suddenly invalidates
that mapping, causing the apps to fail loading their own
resources

This change switches to the in-place update with the full
config recalculation under a lock. It's slow, but hopefully
doesn't cause too many discrepancies in the resource lookups

Bug: 412905284
Test: atest ResourcesManagerTest
Flag: EXEMPT bugfix
Change-Id: I30e162e504724b30cb0d892c950ad6c3057804d2
parent 5deb3ba4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment