summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lyn Han <lynhan@google.com> 2021-06-01 13:05:40 -0500
committer Lyn Han <lynhan@google.com> 2021-06-01 18:18:14 +0000
commitcc8afa6b5020d0fe153baf2dd8656a87510f31f8 (patch)
tree07e472f4776fe0791e74ca99adc31bd73e3c1b91
parentf954c8435564977217e91b1abae993d6a741ba30 (diff)
Fix disappearing notifications when closing fullscreen QS
We might be setting alpha to 0 for wakeup-related events at that point. Let's not do that when shade is open. This change adds a keyguard check Bug: 189313235 Test: manual Change-Id: Ibc73f71d31f3b10714a9c7ce4bb9a121e497ed5b
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java16
1 files changed, 9 insertions, 7 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 86465b6f6b1a..b60ef1d62ef5 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
@@ -382,13 +382,15 @@ public class StackScrollAlgorithm {
final boolean isHunGoingToShade = ambientState.isShadeExpanded()
&& view == ambientState.getTrackedHeadsUpRow();
- if (!isHunGoingToShade) {
- if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) {
- viewState.alpha = Interpolators.getNotificationScrimAlpha(
- ambientState.getExpansionFraction(), true /* notification */);
- } else {
- viewState.alpha = 1f - ambientState.getHideAmount();
- }
+ if (isHunGoingToShade) {
+ // Keep 100% opacity for heads up notification going to shade.
+ } else if (ambientState.isOnKeyguard()) {
+ // Adjust alpha for wakeup to lockscreen.
+ viewState.alpha = 1f - ambientState.getHideAmount();
+ } else if (ambientState.isExpansionChanging()) {
+ // Adjust alpha for shade open & close.
+ viewState.alpha = Interpolators.getNotificationScrimAlpha(
+ ambientState.getExpansionFraction(), true /* notification */);
}
if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {