Merge "Fix the premature hiding of notifications while expanding QS." into sc-dev am: f9f6e08208

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15133292

Change-Id: I9ec358f25fcce1034057371bffec71c9dc15804a
This commit is contained in:
Jeff DeCew
2021-06-29 14:58:27 +00:00
committed by Automerger Merge Worker

View File

@@ -420,8 +420,9 @@ public class StackScrollAlgorithm {
// When pulsing (incoming notification on AOD), innerHeight is 0; clamp all
// to shelf start, thereby hiding all notifications (except the first one, which we
// later unhide in updatePulsingState)
final int shelfStart = ambientState.getInnerHeight()
- ambientState.getShelf().getIntrinsicHeight();
final int stackBottom = !ambientState.isShadeExpanded() || ambientState.isDozing()
? ambientState.getInnerHeight() : (int) ambientState.getStackHeight();
final int shelfStart = stackBottom - ambientState.getShelf().getIntrinsicHeight();
viewState.yTranslation = Math.min(viewState.yTranslation, shelfStart);
if (viewState.yTranslation >= shelfStart) {
viewState.hidden = !view.isExpandAnimationRunning()