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

Commit 91628f6c authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Fixed a bug with the number of notifications visible on lockscreen" into nyc-dev

parents 527bcac4 53f8e7d5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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;
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -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);