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
This commit is contained in:
Selim Cinek
2016-11-28 14:24:18 -08:00
parent cac1d6a00b
commit 1f8c21c116

View File

@@ -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);