Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9654d74e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix fluctuating notification height during shade open" into sc-dev am: 51f0592f

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

Change-Id: I6284f3de7449db755ff490310d1d8c765024b043
parents e19eea3c 51f0592f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1142,7 +1142,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        if (mQsExpansionFraction <= 0) {
            final float scrimTopPadding = mAmbientState.isOnKeyguard() ? 0 : mSidePaddings;
            final float stackEndHeight = Math.max(0f,
                    getHeight() - getEmptyBottomMargin() - stackY);
                    getHeight() - getEmptyBottomMargin() - mTopPadding);
            mAmbientState.setStackEndHeight(stackEndHeight);
            mAmbientState.setStackHeight(
                    MathUtils.lerp(stackEndHeight * StackScrollAlgorithm.START_FRACTION,
+6 −7
Original line number Diff line number Diff line
@@ -348,14 +348,14 @@ public class StackScrollAlgorithm {
            StackScrollAlgorithmState algorithmState,
            AmbientState ambientState) {

        final boolean isShowingShelf = ambientState.getShelf() != null
        final boolean showingShelf = ambientState.getShelf() != null
                && algorithmState.firstViewInShelf != null;

        final float stackHeight = ambientState.getStackHeight()
                - (isShowingShelf ? ambientState.getShelf().getIntrinsicHeight() : 0f);
        final float shelfHeight = showingShelf ? ambientState.getShelf().getIntrinsicHeight() : 0f;
        final float scrimPadding = ambientState.isOnKeyguard() ? 0 : mNotificationScrimPadding;

        float stackEndHeight = ambientState.getStackEndHeight()
                - (isShowingShelf ? ambientState.getShelf().getIntrinsicHeight() : 0f);
        final float stackHeight = ambientState.getStackHeight()  - shelfHeight - scrimPadding;
        final float stackEndHeight = ambientState.getStackEndHeight() - shelfHeight - scrimPadding;

        return stackHeight / stackEndHeight;
    }
@@ -459,8 +459,7 @@ public class StackScrollAlgorithm {
                    maxViewHeight = algorithmState.viewHeightBeforeShelf;
                }
            }
            viewState.height = (int) MathUtils.lerp(maxViewHeight * START_FRACTION, maxViewHeight,
                    expansionFraction);
            viewState.height = (int) (maxViewHeight * expansionFraction);
        }

        currentYPosition += viewState.height + expansionFraction * mPaddingBetweenElements;