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

Skip to content
Commit 39fe17c8 authored by Romain Guy's avatar Romain Guy
Browse files

Cache drawable constant states instead of drawables

Bug #5678369

Caching drawables directly in a static map was responsible for runtime
restarts. If two different UI threads requested the same drawable, the
first thread to issue the request would be given a drawable callback
belonging to the second thread. This would cause an exception in
ViewRootImpl on invalidate.

The solution is to store the drawable states and to create a new
drawable instance every time a drawable is requested from the
cache. This is similar to how preloaded resources are handled.

Change-Id: I47e24e2a168cf67a3589185c6cd77b70f9a1c7cf
parent 8279acb9
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