Don't decay when it will be too slow
This CL makes the settle animation of STL swipe transitions feel better by avoiding the case when the velocity is just high enough to reach the target offset but still a bit too low, causing the settle animation to be too slow. The idea is to simply perform whichever of the spring or decay animation will be the fastest. Unfortunately there are no APIs to know how long it will take for an animation to reach the target offset for the first time, so these durations have to be computed analytically. See b/417444347#comment3 for details. Bug: 417444347 Flag: com.android.systemui.scene_container Test: atest SwipeAnimationTest Change-Id: Ifb2ee648c6a3937050fcf27319b588b66c89a01b
Loading
Please register or sign in to comment