summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mady Mellor <madym@google.com> 2016-06-22 16:54:08 +0000
committer android-build-merger <android-build-merger@google.com> 2016-06-22 16:54:08 +0000
commitf56bcc792573ded3abdbd8c96bff18def72ec016 (patch)
treecbaa6b41c46c3a0cecd456245ae9f4fcf9af401a
parenta5076ef7fa58c504eeb55020d47e67bace0a4872 (diff)
parent6b6bf9cd54d8f0946d9bba3f9ca222757e879d4b (diff)
Merge \"Don\'t show the shade background for heads up notifications\" into nyc-dev
am: 6b6bf9cd54 Change-Id: Ic6d8f5c1d1a8eed8e0bc9657c11c77890cd64e7c
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java6
1 files 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 c8c7d3d4c7cb..5eaea90479ce 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;