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

Commit 18f2a05b authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

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

parents cd34b85c ea4a7a6c
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>) {