Merge "Autobundle all notifications; don't leave the most recent one free." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e3e8eeaa7f
@@ -73,13 +73,8 @@ public final class Ranker extends NotificationRankerService {
|
|||||||
mUnbundledNotifications.put(sbn.getPackageName(), notificationsForPackage);
|
mUnbundledNotifications.put(sbn.getPackageName(), notificationsForPackage);
|
||||||
|
|
||||||
if (notificationsForPackage.size() >= AUTOBUNDLE_AT_COUNT) {
|
if (notificationsForPackage.size() >= AUTOBUNDLE_AT_COUNT) {
|
||||||
// Autobundle all but the most recently posted (not updated) notification.
|
|
||||||
int count = 0;
|
|
||||||
for (String key : notificationsForPackage) {
|
for (String key : notificationsForPackage) {
|
||||||
if (count < notificationsForPackage.size() - 1) {
|
notificationsToBundle.add(key);
|
||||||
notificationsToBundle.add(key);
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user