From c445dcc50526065a76e97e64a0ca54778d8dde48 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 7 May 2018 16:00:11 -0700 Subject: AOD padding animation should match slice Top padding animates when a new notification arrives and same duration should be used, otherwise elements would overlap. Test: visual Bug: 76110106 Change-Id: I016a796df93fd1b6852922bc646f616c68ec624e --- .../statusbar/stack/NotificationStackScrollLayout.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 7370c4c1c0d1..5deebffc4778 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -3331,8 +3331,16 @@ public class NotificationStackScrollLayout extends ViewGroup private void generateTopPaddingEvent() { if (mTopPaddingNeedsAnimation) { - mAnimationEvents.add( - new AnimationEvent(null, AnimationEvent.ANIMATION_TYPE_TOP_PADDING_CHANGED)); + AnimationEvent event; + if (mAmbientState.isDark()) { + event = new AnimationEvent(null /* view */, + AnimationEvent.ANIMATION_TYPE_TOP_PADDING_CHANGED, + KeyguardSliceView.DEFAULT_ANIM_DURATION); + } else { + event = new AnimationEvent(null /* view */, + AnimationEvent.ANIMATION_TYPE_TOP_PADDING_CHANGED); + } + mAnimationEvents.add(event); } mTopPaddingNeedsAnimation = false; } -- cgit v1.2.3-59-g8ed1b