Merge "Remove DynamicAnimation when it ends." into rvc-dev am: 76810f4432

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11814938

Change-Id: I81ec924b4dfbc661d017b00e468fbdef5ef41019
This commit is contained in:
TreeHugger Robot
2020-06-10 19:22:04 +00:00
committed by Automerger Merge Worker

View File

@@ -644,6 +644,12 @@ class PhysicsAnimator<T> private constructor (target: T) {
it.onInternalAnimationEnd(
property, canceled, value, velocity, anim is FlingAnimation)
}
if (springAnimations[property] == anim) {
springAnimations.remove(property)
}
if (flingAnimations[property] == anim) {
flingAnimations.remove(property)
}
}
return anim
}