diff options
author | 2024-02-20 14:46:21 -0800 | |
---|---|---|
committer | 2024-02-20 16:46:01 -0800 | |
commit | b8a612122b8d3b229889e2308a7077571801e7ec (patch) | |
tree | e4211517beb8ea5ee930f44ef8ad735d253c50f0 /libs/input/SpriteController.cpp | |
parent | 9bbc5ba475110013dda6edb93a189e929d8eac02 (diff) |
Make animation notifications thread safe.
Fixes: 322266912
A system UI was calling pause() on an animator from a non-UI
thread. Previously, this was safe as long as the listener
list didn't change. Now, there is a possibility of a crash
because the cache is reused with the call.
This CL makes the access to the cache thread safe.
I tried to make a test to validate that this code works, but
it turns out to be extremely difficult to reproduce. The
pausing thread must interrupt between just a few instructions
and even running several hundred thousand times, I could not
reproduce it.
Test: ran existing tests
Change-Id: Ic0affd711ca0330edabd5f7f65f2731646ad8c77
Diffstat (limited to 'libs/input/SpriteController.cpp')
0 files changed, 0 insertions, 0 deletions