From a335a46cc252cebea268f09db5babcc7d272de88 Mon Sep 17 00:00:00 2001 From: Nate Myren Date: Tue, 1 Jun 2021 10:16:45 -0700 Subject: [PATCH] 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 --- .../statusbar/events/SystemStatusAnimationScheduler.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt index 655ed41327260..3143eb2378868 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt @@ -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?) {