Merge "Fixed a bug with the number of notifications visible on lockscreen" into nyc-dev
This commit is contained in:
@@ -202,6 +202,7 @@ public class NotificationPanelView extends PanelView implements
|
||||
notifyBarPanelExpansionChanged();
|
||||
}
|
||||
};
|
||||
private NotificationGroupManager mGroupManager;
|
||||
|
||||
public NotificationPanelView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
@@ -415,6 +416,11 @@ public class NotificationPanelView extends PanelView implements
|
||||
if (!(child instanceof ExpandableNotificationRow)) {
|
||||
continue;
|
||||
}
|
||||
boolean suppressedSummary = mGroupManager.isSummaryOfSuppressedGroup(
|
||||
((ExpandableNotificationRow) child).getStatusBarNotification());
|
||||
if (suppressedSummary) {
|
||||
continue;
|
||||
}
|
||||
availableSpace -= child.getMinHeight() + notificationPadding;
|
||||
if (availableSpace >= 0 && count < maximum) {
|
||||
count++;
|
||||
@@ -2298,4 +2304,8 @@ public class NotificationPanelView extends PanelView implements
|
||||
List<ActivityManager.RunningTaskInfo> tasks = am.getRunningTasks(1);
|
||||
return !tasks.isEmpty() && pkgName.equals(tasks.get(0).topActivity.getPackageName());
|
||||
}
|
||||
|
||||
public void setGroupManager(NotificationGroupManager groupManager) {
|
||||
mGroupManager = groupManager;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,6 +708,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
mNotificationPanel = (NotificationPanelView) mStatusBarWindow.findViewById(
|
||||
R.id.notification_panel);
|
||||
mNotificationPanel.setStatusBar(this);
|
||||
mNotificationPanel.setGroupManager(mGroupManager);
|
||||
|
||||
mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar);
|
||||
mStatusBarView.setBar(this);
|
||||
|
||||
Reference in New Issue
Block a user