diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index b6ef5947bcaf2..6164f29f1ca4b 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -774,6 +774,9 @@ true + + true + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt index 23edf1787649a..2403920e69f97 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt @@ -164,7 +164,9 @@ constructor( } private fun isChipAnimationEnabled(): Boolean { - return DeviceConfig.getBoolean(NAMESPACE_PRIVACY, CHIP_ANIMATION_ENABLED, true) + val defaultValue = + context.resources.getBoolean(R.bool.config_enablePrivacyChipAnimation) + return DeviceConfig.getBoolean(NAMESPACE_PRIVACY, CHIP_ANIMATION_ENABLED, defaultValue) } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationSchedulerImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationSchedulerImpl.kt index e0183971141df..f40f570991108 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationSchedulerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationSchedulerImpl.kt @@ -243,7 +243,7 @@ constructor( if (!event.showAnimation && event.forceVisible) { // If animations are turned off, we'll transition directly to the dot animationState.value = SHOWING_PERSISTENT_DOT - notifyTransitionToPersistentDot() + notifyTransitionToPersistentDot(event) return } @@ -335,7 +335,7 @@ constructor( } animators.add(chipAnimationController.onSystemEventAnimationFinish(hasPersistentDot)) if (hasPersistentDot) { - val dotAnim = notifyTransitionToPersistentDot() + val dotAnim = notifyTransitionToPersistentDot(currentlyDisplayedEvent) if (dotAnim != null) { animators.add(dotAnim) } @@ -344,12 +344,12 @@ constructor( return AnimatorSet().also { it.playTogether(animators) } } - private fun notifyTransitionToPersistentDot(): Animator? { + private fun notifyTransitionToPersistentDot(event: StatusEvent?): Animator? { logger?.logTransitionToPersistentDotCallbackInvoked() val anims: List = listeners.mapNotNull { it.onSystemStatusAnimationTransitionToPersistentDot( - currentlyDisplayedEvent?.contentDescription + event?.contentDescription ) } if (anims.isNotEmpty()) {