From 53ac1ef993e4bdce0d155fa00a133540f29af0ed Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Mon, 20 Jun 2016 13:11:38 -0700 Subject: [PATCH] Don't show the shade background for heads up notifications This looked weird when dismissing. Change-Id: I9c4256a4c8792c4ff81d3cf1e34c45591853c206 Fixes: 29462609 --- .../systemui/statusbar/stack/StackScrollAlgorithm.java | 6 ++++-- 1 file changed, 4 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 5d2698898e305..1037db3d4d2ab 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -152,8 +152,10 @@ public class StackScrollAlgorithm { float newYTranslation = state.yTranslation; float newHeight = state.height; float newNotificationEnd = newYTranslation + newHeight; - - if (newYTranslation < previousNotificationEnd) { + boolean isHeadsUp = (child instanceof ExpandableNotificationRow) + && ((ExpandableNotificationRow) child).isPinned(); + if (newYTranslation < previousNotificationEnd && ambientState.isShadeExpanded() + && !isHeadsUp) { // The previous view is overlapping on top, clip! float overlapAmount = previousNotificationEnd - newYTranslation; state.clipTopAmount = (int) overlapAmount;