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

Commit 2b8209a8 authored by Winson Chung's avatar Winson Chung
Browse files

Fix an issue with canceling a PhysicsAnimator

- Canceling was previously missing some endAction calls due to the
  properties changing mid-iteration
- In particular:
  - cancel() calls cancelAction with springAnimations.keys
  - cancelInternal() would then iterate through each property and
    calling cancel() on the associated animation in order
  - however, the endListener set in configureDynamicAnimation()
    will call onInternalAnimationEnd on the internal listeners and
    then remove the property from springAnimations.  This changes
    the list that we are currently iterating in cancelInternal()
    so the iterator is invalid (next() returns a null property which
    is silently missed because of the inline null check)

Bug: 419081119
Flag: EXEMPT bugfix
Test: atest PhysicsAnimatorTest
Change-Id: I84254b388954a7fdd531507c37c432a27cd0d770
parent 29967216
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