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

Commit eeb9d1a2 authored by András Kurucz's avatar András Kurucz
Browse files

[Flexiglass] Update NSSL.updateStackPosition() to only update stack heights

NSSL.updateStackPosition() used to update AmbientState.mStackY, to scale it with the expansion fraction, but stackY is not used anymore with the SceneContainer.

Bug: 332574413
Test: check notification placement in various scenarios
Flag: com.android.systemui.scene_container
Change-Id: Ice2fe04118a1deb403bcd211c132a69bcbd2fc43
parent 6aa02884
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1439,6 +1439,11 @@ public class NotificationStackScrollLayout
     * @param listenerNeedsAnimation does the listener need to animate?
     */
    private void updateStackPosition(boolean listenerNeedsAnimation) {
        // When scene container is active, we only want to recalculate stack heights.
        if (SceneContainerFlag.isEnabled()) {
            updateStackEndHeightAndStackHeight(mAmbientState.getExpansionFraction());
            return;
        }
        float topOverscrollAmount = mShouldUseSplitNotificationShade
                ? getCurrentOverScrollAmount(true /* top */) : 0f;
        final float endTopPosition = getTopPadding() + mExtraTopInsetForFullShadeTransition
@@ -1451,10 +1456,8 @@ public class NotificationStackScrollLayout
        if (mAmbientState.isBouncerInTransit() && mQsExpansionFraction > 0f) {
            fraction = BouncerPanelExpansionCalculator.aboutToShowBouncerProgress(fraction);
        }
        if (!SceneContainerFlag.isEnabled()) {
        final float stackY = MathUtils.lerp(0, endTopPosition, fraction);
        mAmbientState.setStackY(stackY);
        }

        if (mOnStackYChanged != null) {
            mOnStackYChanged.accept(listenerNeedsAnimation);