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

Skip to content
Commit 5cc5dc72 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

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
parent c14c0eac
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