Merge \"Don\'t show the shade background for heads up notifications\" into nyc-dev

am: 6b6bf9cd54

Change-Id: Ic6d8f5c1d1a8eed8e0bc9657c11c77890cd64e7c
This commit is contained in:
Mady Mellor
2016-06-22 16:54:08 +00:00
committed by android-build-merger

View File

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