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
This commit is contained in:
Selim Cinek
2016-11-22 14:31:21 -08:00
parent c519dcf1fb
commit 7e7c6e2c8e

View File

@@ -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;