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
Loading
Please register or sign in to comment