diff options
| author | 2025-01-09 10:06:16 -0800 | |
|---|---|---|
| committer | 2025-01-09 10:06:16 -0800 | |
| commit | 73387d2cedd49a830c013173697c174bc00ab805 (patch) | |
| tree | 6e313545dafc991a3911070a41d8a3f619c8815b /libs/androidfw/StringPool.cpp | |
| parent | 56bb04a019b430e7bb693a86441ac1198e8af9dc (diff) | |
Fix concurrent modification issue with lifecycle listeners.
I couldn't repro the bug locally as it is a flake that requires precise timing, but the problem is the list of listeners being updated during an animation, which calls `onTransitionAnimationProgress()` on each frame.
By using defensive copies in these lifecycle methods, we avoid the concurrent modification issue. The worst that will happen is that we will call a listener that has just been deregistered (or not call one that has just been registered), but since it's a race condition anyway there should be no expectation that this doesn't happen in the current frame.
Change-Id: I2ed33334ddcfcf7672fc1f94af7ccc49700f46ee
Fix: 386122979
Flag: EXEMPT bugfix
Test: atest ActivityTransitionAnimatorTest
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions