Merge "Skip cancel of physics animators if not needed" into tm-qpr-dev am: ea4a7a6cf9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19237416 Change-Id: I0296265e2993f0570ee69b4266b2207b63c6e9dd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -829,9 +829,13 @@ class PhysicsAnimator<T> private constructor (target: T) {
|
|||||||
|
|
||||||
/** Cancels all in progress animations on all properties. */
|
/** Cancels all in progress animations on all properties. */
|
||||||
fun cancel() {
|
fun cancel() {
|
||||||
|
if (flingAnimations.size > 0) {
|
||||||
cancelAction(flingAnimations.keys)
|
cancelAction(flingAnimations.keys)
|
||||||
|
}
|
||||||
|
if (springAnimations.size > 0) {
|
||||||
cancelAction(springAnimations.keys)
|
cancelAction(springAnimations.keys)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Cancels in progress animations on the provided properties only. */
|
/** Cancels in progress animations on the provided properties only. */
|
||||||
fun cancel(vararg properties: FloatPropertyCompat<in T>) {
|
fun cancel(vararg properties: FloatPropertyCompat<in T>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user