From b6d298a4d57a62cc5d4f79b715be61ce2e4b74f6 Mon Sep 17 00:00:00 2001 From: Evan Laird Date: Mon, 7 Mar 2022 15:49:38 -0500 Subject: [PATCH] Don't transition to ongoing privacy dot if still animating If privacy events come in very fast (during the debounce time), we sometimes would transition to showing the ongoing privacy event dot before the animation finished. Test: manual Fixes: 222554701 Change-Id: I270e0180655eb2a6254a17ce6f18f0fd4a77b081 --- .../statusbar/events/SystemStatusAnimationScheduler.kt | 5 ++++- 1 file changed, 4 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 947f3eb2ee123..9e3782f8bfe2f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt @@ -116,7 +116,10 @@ class SystemStatusAnimationScheduler @Inject constructor( scheduledEvent?.updateFromEvent(event) if (event.forceVisible) { hasPersistentDot = true - notifyTransitionToPersistentDot() + // If we missed the chance to show the persistent dot, do it now + if (animationState == IDLE) { + notifyTransitionToPersistentDot() + } } } else { if (DEBUG) {