Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73387d2c authored by Luca Zuccarini's avatar Luca Zuccarini
Browse files

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
parent 56bb04a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment