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