summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-07-29 20:33:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-07-29 20:33:42 +0000
commitbb94263ca2c305fa16c783fb8d6aa44569f13194 (patch)
treef6d43d4c7433b60541da99174c9a6d84643ae9b3
parent7256c379df3524b75aee53c282ce072f7058a9d8 (diff)
parent15803b51e3ec5e3335f54cab12bdd7697df865d9 (diff)
Merge "Showing the notification icon properly now when the pulse is suppressed" into qt-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java3
3 files changed, 8 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 312ea473d9e6..165c64e7a6a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -512,7 +512,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
float viewEnd = row.getTranslationY() + row.getActualHeight();
boolean isPinned = (row.isPinned() || row.isHeadsUpAnimatingAway())
&& !mAmbientState.isDozingAndNotPulsing(row);
- boolean shouldClipOwnTop = row.showingAmbientPulsing()
+ boolean shouldClipOwnTop = row.showingAmbientPulsing() && !mAmbientState.isFullyDark()
|| (mAmbientState.isPulseExpanding() && childIndex == 0);
if (viewEnd > notificationClipEnd && !shouldClipOwnTop
&& (mAmbientState.isShadeExpanded() || !isPinned)) {
@@ -752,8 +752,9 @@ public class NotificationShelf extends ActivatableNotificationView implements
iconState.scaleY = 1.0f;
iconState.hidden = false;
}
- if (row.isAboveShelf() || (!row.isInShelf() && (isLastChild && row.areGutsExposed()
- || row.getTranslationZ() > mAmbientState.getBaseZHeight()))) {
+ if ((row.isAboveShelf() || (!row.isInShelf() && (isLastChild && row.areGutsExposed()
+ || row.getTranslationZ() > mAmbientState.getBaseZHeight())))
+ && !mAmbientState.isFullyDark()) {
iconState.hidden = true;
}
int backgroundColor = getBackgroundColorWithoutTint();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 09352cfd17a3..237825e44b97 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -1355,7 +1355,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
mIsClipped = clipped;
}
- if (!mAmbientPulseManager.hasNotifications() && mAmbientState.isFullyDark()) {
+ if (!mPulsing && mAmbientState.isFullyDark()) {
setClipBounds(null);
} else if (mAmbientState.isDarkAtAll()) {
clipToOutline = true;
@@ -5169,6 +5169,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
return;
}
mPulsing = pulsing;
+ updateClipping();
mAmbientState.setPulsing(pulsing);
mSwipeHelper.setPulsing(pulsing);
updateNotificationAnimationStates();
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 60061c6a9ad2..d9f8c88e0d13 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
@@ -501,7 +501,8 @@ public class StackScrollAlgorithm {
continue;
}
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
- if (!row.showingAmbientPulsing() || (i == 0 && ambientState.isPulseExpanding())) {
+ if (!row.showingAmbientPulsing() || ambientState.isFullyDark()
+ || (i == 0 && ambientState.isPulseExpanding())) {
continue;
}
ExpandableViewState viewState = row.getViewState();