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

Commit 0e749a97 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix notifications trimmed when unfolded on keyguard" into tm-dev am:...

Merge "Fix notifications trimmed when unfolded on keyguard" into tm-dev am: e077c526 am: adabb768 am: f75d1d67

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



Change-Id: I11474af18b970e1dbaae63dfe00a04df1018229c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 9bf78788 f75d1d67
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -415,6 +415,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    private boolean mForwardScrollable;
    private boolean mBackwardScrollable;
    private NotificationShelf mShelf;
    /**
     * Limits the number of visible notifications. The remaining are collapsed in the notification
     * shelf. -1 when there is no limit.
     */
    private int mMaxDisplayedNotifications = -1;
    private float mKeyguardBottomPadding = -1;
    @VisibleForTesting int mStatusBarHeight;
@@ -1323,7 +1327,14 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    private float updateStackEndHeight(float height, float bottomMargin, float topPadding) {
        final float stackEndHeight = Math.max(0f, height - bottomMargin - topPadding);
        final float stackEndHeight;
        if (mMaxDisplayedNotifications != -1) {
            // The stack intrinsic height already contains the correct value when there is a limit
            // in the max number of notifications (e.g. as in keyguard).
            stackEndHeight = mIntrinsicContentHeight;
        } else {
            stackEndHeight = Math.max(0f, height - bottomMargin - topPadding);
        }
        mAmbientState.setStackEndHeight(stackEndHeight);
        return stackEndHeight;
    }