From 1f8c21c116a8e436c1484968ff1644ad9bdaa96e Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 28 Nov 2016 14:24:18 -0800 Subject: [PATCH] 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 --- .../systemui/statusbar/phone/NotificationPanelView.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 523528d4d40e4..99e98f2e66352 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -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);