From 0fdf574bc891a0f98b17159ee9156dae4044577c Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Mon, 27 Jun 2016 11:50:58 -0700 Subject: Fix smooth panel deceleration State of dismiss view was wrong when the panel was closed, thus, we didn't apply our logic for smooth panel deceleration anymore. Bug: 29579394 Change-Id: I79718517e776adad092457aba6db18219998fde1 --- .../com/android/systemui/statusbar/stack/StackScrollAlgorithm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java index 5eaea90479ce..87e87c8e9bb3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -154,8 +154,8 @@ public class StackScrollAlgorithm { float newNotificationEnd = newYTranslation + newHeight; boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); - if (newYTranslation < previousNotificationEnd && ambientState.isShadeExpanded() - && !isHeadsUp) { + if (newYTranslation < previousNotificationEnd + && (!isHeadsUp || ambientState.isShadeExpanded())) { // The previous view is overlapping on top, clip! float overlapAmount = previousNotificationEnd - newYTranslation; state.clipTopAmount = (int) overlapAmount; -- cgit v1.2.3-59-g8ed1b