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

Commit aa417dac authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed the lockscreen positon with a single notificaton

The notification was wrongly pushed up on the lockscreen
if there was only a single notification.

Test: Add a single notification, observe that it's not pushed in.
Bug: 32437839
Change-Id: Ica6275d0efb18a0a39d943e874d464a86593d5b3
parent cafa87f9
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -769,11 +769,17 @@ public class NotificationStackScrollLayout extends ViewGroup
     *         Measured in absolute height.
     */
    private float getAppearEndPosition() {
        int firstItemHeight = mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()
                ? mHeadsUpManager.getTopHeadsUpPinnedHeight() + mBottomStackPeekSize
                        + mBottomStackSlowDownHeight
                : getFirstItemMinHeight() + mShelf.getIntrinsicHeight();
        return firstItemHeight + (onKeyguard() ? mTopPadding : mIntrinsicPadding);
        int appearPosition;
        if (mTrackingHeadsUp || mHeadsUpManager.hasPinnedHeadsUp()) {
            appearPosition = mHeadsUpManager.getTopHeadsUpPinnedHeight() + mBottomStackPeekSize
                    + mBottomStackSlowDownHeight;
        } else {
            appearPosition = getFirstItemMinHeight();
            if (mAmbientState.getShelfIndex() > 1) {
                appearPosition += mShelf.getIntrinsicHeight();
            }
        }
        return appearPosition + (onKeyguard() ? mTopPadding : mIntrinsicPadding);
    }

    /**