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

Commit 1f8c21c1 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug with the maximum number of notifications

The shelf size was accounted for twice.

Test: add notifications, observe overflow behavior on lockscreen
Bug: 32437839
Change-Id: I2c372243cbc4fcd9223715f398f3ec233b87f9db
parent cac1d6a0
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -404,12 +404,9 @@ public class NotificationPanelView extends PanelView implements
                mKeyguardStatusView.getHeight());
        int notificationPadding = Math.max(1, getResources().getDimensionPixelSize(
                R.dimen.notification_divider_height));
        final int overflowheight = getResources().getDimensionPixelSize(
                R.dimen.notification_shelf_height);
        float shelfSize = mNotificationStackScroller.getNotificationShelf().getIntrinsicHeight()
                + notificationPadding;
        float availableSpace = mNotificationStackScroller.getHeight() - minPadding - overflowheight
                - shelfSize;
        float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize;
        int count = 0;
        for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {
            ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);