summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Johannes Gallmann <gallmann@google.com> 2023-08-10 11:14:47 +0200
committer Johannes Gallmann <gallmann@google.com> 2023-08-10 11:14:47 +0200
commit819045661652cbe4088cb2f8cf9dd00a78b210b2 (patch)
tree984881319aa5520772cce097b49782cfff13ba44
parent3393c82f6d79fc35de78fe9c70aff0bb6eb7b817 (diff)
Fix animation mismatch between privacy chip and persistent dot
Bug: 295274992 Test: Manual, i.e. testing the privacy chip animation on multiple devices Change-Id: I79ba92b36a984ba78e92795b0570e1d7b8714431
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt
index 6e8b8bdebbe3..1ad4620f9dfa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt
@@ -168,10 +168,8 @@ class SystemEventChipAnimationController @Inject constructor(
}
val keyFrame1Height = dotSize * 2
- val v = currentAnimatedView!!.view
- val chipVerticalCenter = v.top + v.measuredHeight / 2
- val height1 = ValueAnimator.ofInt(
- currentAnimatedView!!.view.measuredHeight, keyFrame1Height).apply {
+ val chipVerticalCenter = chipBounds.top + chipBounds.height() / 2
+ val height1 = ValueAnimator.ofInt(chipBounds.height(), keyFrame1Height).apply {
startDelay = 8.frames
duration = 6.frames
interpolator = STATUS_CHIP_HEIGHT_TO_DOT_KEYFRAME_1