Loading
Fix predictive back animations jump at beginning of app animations
We should not call reset() just before starting a new back animation, to prevent progress jumps at the beginning of the animation. The reason for the jumps is that inside `reset()` `skipToEnd()` is called. This causes a SpringAnimation-internal flag `mEndRequested` to be flipped to true, which in turn has the effect that on the next frame the spring is immediately set to the requested position. However, by that time, the progress may already have moved a substantial amount, which causes the animation jumps. Only call reset() before starting a new animation, if absolutely necessary, i.e. if there's still an ongoing cancel animation of a previous back gesture in progress. Bug: 341257287 Flag: com.android.window.flags.predictive_back_system_anims NEXTFOOD Test: Manual, i.e. analysing progress logs of app callbacks Change-Id: Ib7faf6a82b95996d0d85d5305181665638d7d5f6