Fixed an issue where notifications could visually overlap

While pulsing the notifications could overlap because they
were transparent. We're now making them not dimmable if they
are pulsing.

Fixes: 	129501157
Test: add 2 pulsing notifications, observe no overlap
Change-Id: Ic6db70a4d0dc202858834402e35a0e00fe631d68
This commit is contained in:
Selim Cinek
2019-05-28 17:39:49 -07:00
parent 8af0af88cc
commit f434a7479c
4 changed files with 8 additions and 2 deletions

View File

@@ -207,7 +207,7 @@ class NotificationWakeUpCoordinator @Inject constructor(
// if we animate, we see the shelf briefly visible. Instead we fully animate
// the notification and its background out
animate = false
} else {
} else if (!mWakingUp && !willWakeUp){
entry.setAmbientGoingAway(true)
mEntrySetToClearWhenFinished.add(entry)
}

View File

@@ -648,6 +648,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
if (!getShowingLayout().isDimmable()) {
return false;
}
if (showingAmbientPulsing()) {
return false;
}
return super.isDimmable();
}

View File

@@ -212,7 +212,9 @@ public class AmbientState {
}
public boolean isDimmed() {
return mDimmed;
// While we are expanding from pulse, we want the notifications not to be dimmed, otherwise
// you'd see the difference to the pulsing notification
return mDimmed && !(isPulseExpanding() && mDozeAmount == 1.0f);
}
public boolean isDark() {

View File

@@ -5710,6 +5710,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
view.setTranslationY(wakeUplocation);
}
}
mDimmedNeedsAnimation = true;
}
@Override