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

Commit ea4a7a6c authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Skip cancel of physics animators if not needed" into tm-qpr-dev

parents 8eee52bf b41f317d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -829,9 +829,13 @@ class PhysicsAnimator<T> private constructor (target: T) {

    /** Cancels all in progress animations on all properties. */
    fun cancel() {
        if (flingAnimations.size > 0) {
            cancelAction(flingAnimations.keys)
        }
        if (springAnimations.size > 0) {
            cancelAction(springAnimations.keys)
        }
    }

    /** Cancels in progress animations on the provided properties only. */
    fun cancel(vararg properties: FloatPropertyCompat<in T>) {