Cancel flings before restarting them.
Test: atest SystemUITests Change-Id: I68ed3beef526d93104bd9da809aa5f49d15a1e91
This commit is contained in:
@@ -416,8 +416,10 @@ class PhysicsAnimator<T> private constructor (val target: T) {
|
||||
max = max(currentValue, this.max)
|
||||
}
|
||||
|
||||
// Apply the configuration and start the animation.
|
||||
// Apply the configuration and start the animation. Since flings can't be
|
||||
// redirected while in motion, cancel it first.
|
||||
getFlingAnimation(animatedProperty)
|
||||
.also { it.cancel() }
|
||||
.also { flingConfig.applyToAnimation(it) }
|
||||
.start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user