From 7e7c6e2c8eb3b67dc497cbf520c694873ce83149 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 22 Nov 2016 14:31:21 -0800 Subject: [PATCH] Fixed the clipTopAmount when transforming into the shelf The clipTopAmount shouldn't apply to notifications in the shelf, since otherwise the background may flicker. Change-Id: Ifac2b821896eaaeea81e44847579d8ec0ced816d Test: expand notification, such that the background appears when being gone before, observe no clipping. Bug: 32437839 --- .../android/systemui/statusbar/stack/StackScrollAlgorithm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 17e73d2141358..7afc7ba0a0c1e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java @@ -140,7 +140,7 @@ public class StackScrollAlgorithm { float newNotificationEnd = newYTranslation + newHeight; boolean isHeadsUp = (child instanceof ExpandableNotificationRow) && ((ExpandableNotificationRow) child).isPinned(); - if (newYTranslation < previousNotificationEnd + if (!state.inShelf && newYTranslation < previousNotificationEnd && (!isHeadsUp || ambientState.isShadeExpanded())) { // The previous view is overlapping on top, clip! float overlapAmount = previousNotificationEnd - newYTranslation;