diff options
author | Fabian Kozynski <kozynski@google.com> | 2019-05-13 15:24:10 -0400 |
---|---|---|
committer | Fabian Kozynski <kozynski@google.com> | 2019-05-17 08:53:49 -0400 |
commit | fa1a1e218829b2b56ec40efeefa1e195e4050b58 (patch) | |
tree | e31bc846dad70f00abebb0df5349d860b0e6fc94 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | d7affe71710d08ae738c353411571a60c56e6172 (diff) |
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions