summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2019-07-30 13:23:19 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-30 13:23:19 -0700
commit241ba4f10cb21affe35c302818ba74a0a5058ab9 (patch)
tree177191295479605d947efa2152c853702a625d2b
parent9af9fe39f01ae49c348af39923d11b2a756ff5ef (diff)
parentdbe49843decf49fbd9619f4cf1959361e09d4468 (diff)
Merge "Only clipping heads up that are not the first ones" into qt-r1-dev
am: dbe49843de Change-Id: Iedd7fac62abde02de70b0e832ec073eb60fbb0ac
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
index 7655056ea60b..ef8048487022 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java
@@ -161,6 +161,7 @@ public class StackScrollAlgorithm {
: 0;
float clipStart = 0;
int childCount = algorithmState.visibleChildren.size();
+ boolean firstHeadsUp = true;
for (int i = 0; i < childCount; i++) {
ExpandableView child = algorithmState.visibleChildren.get(i);
ExpandableViewState state = child.getViewState();
@@ -173,7 +174,7 @@ public class StackScrollAlgorithm {
boolean isHeadsUp = (child instanceof ExpandableNotificationRow)
&& ((ExpandableNotificationRow) child).isPinned();
if (mClipNotificationScrollToTop
- && (!state.inShelf || isHeadsUp)
+ && (!state.inShelf || (isHeadsUp && !firstHeadsUp))
&& newYTranslation < clipStart) {
// The previous view is overlapping on top, clip!
float overlapAmount = clipStart - newYTranslation;
@@ -181,7 +182,9 @@ public class StackScrollAlgorithm {
} else {
state.clipTopAmount = 0;
}
-
+ if (isHeadsUp) {
+ firstHeadsUp = false;
+ }
if (!child.isTransparent()) {
// Only update the previous values if we are not transparent,
// otherwise we would clip to a transparent view.