Merge "Fix smooth panel deceleration" into nyc-dev

This commit is contained in:
TreeHugger Robot
2016-06-27 20:44:55 +00:00
committed by Android (Google) Code Review

View File

@@ -154,8 +154,8 @@ public class StackScrollAlgorithm {
float newNotificationEnd = newYTranslation + newHeight; float newNotificationEnd = newYTranslation + newHeight;
boolean isHeadsUp = (child instanceof ExpandableNotificationRow) boolean isHeadsUp = (child instanceof ExpandableNotificationRow)
&& ((ExpandableNotificationRow) child).isPinned(); && ((ExpandableNotificationRow) child).isPinned();
if (newYTranslation < previousNotificationEnd && ambientState.isShadeExpanded() if (newYTranslation < previousNotificationEnd
&& !isHeadsUp) { && (!isHeadsUp || ambientState.isShadeExpanded())) {
// The previous view is overlapping on top, clip! // The previous view is overlapping on top, clip!
float overlapAmount = previousNotificationEnd - newYTranslation; float overlapAmount = previousNotificationEnd - newYTranslation;
state.clipTopAmount = (int) overlapAmount; state.clipTopAmount = (int) overlapAmount;