Merge "Autobundle all notifications; don\'t leave the most recent one free." into nyc-dev

am: e3e8eeaa7f

* commit 'e3e8eeaa7f604eb1e1a815a8cc438476aa4447b3':
  Autobundle all notifications; don't leave the most recent one free.

Change-Id: I7537c3e1f8934f3d73efd5be7452cd5dcf32bb2b
This commit is contained in:
Julia Reynolds
2016-05-09 18:09:44 +00:00
committed by android-build-merger

View File

@@ -73,13 +73,8 @@ public final class Ranker extends NotificationRankerService {
mUnbundledNotifications.put(sbn.getPackageName(), notificationsForPackage);
if (notificationsForPackage.size() >= AUTOBUNDLE_AT_COUNT) {
// Autobundle all but the most recently posted (not updated) notification.
int count = 0;
for (String key : notificationsForPackage) {
if (count < notificationsForPackage.size() - 1) {
notificationsToBundle.add(key);
}
count++;
notificationsToBundle.add(key);
}
}
}