Skip to content
Commit fa1a1e21 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Make ResourceIcon#get thread safe

Putting a new element in a SparseArray copies the backing array. As
ResourceIcon#get is called both from the main and BG thread, this is not
safe and sometimes leads to a bad state for ResourceIcon#ICONS. In
particular, keys would be assigned to wrong Icon, leading to QS tiles
retrieving and displaying the wrong icon.

Test: atest ResourceIconTest (it fails without the synchronize)
Test: no observable delays caused by icon updates
Fixes: 132435191

Change-Id: I9b3f535d925aa23529b59c0eacb4e67186fdabd2
parent d7affe71
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