Make ChipAnimatorAdapter check dot state when setting endstate

If the ChipAnimatorAdapter attempts to set the end state to
SHOWING_PERSISTENT_DOT after an animation ends, ensure that the dot
should still be shown, otherwise set to IDLE

Test: manual
Fixes: 189598739
Change-Id: I060e767fa08e72e11968e00f6960ffc8cdb70871
This commit is contained in:
Nate Myren
2021-06-01 10:16:45 -07:00
parent 4a99888888
commit a335a46cc2

View File

@@ -299,7 +299,11 @@ class SystemStatusAnimationScheduler @Inject constructor(
) : AnimatorListenerAdapter() {
override fun onAnimationEnd(p0: Animator?) {
chipAnimationController.onChipAnimationEnd(animationState)
animationState = endState
animationState = if (endState == SHOWING_PERSISTENT_DOT && !hasPersistentDot) {
IDLE
} else {
endState
}
}
override fun onAnimationStart(p0: Animator?) {