am ea3bd1ac: Merge "NoMan: Fix speedbump with multiple package priorities" into lmp-dev

* commit 'ea3bd1aca9bed0d06b4f164746710c3ea7c5dd43':
  NoMan: Fix speedbump with multiple package priorities
This commit is contained in:
Christoph Studer
2014-09-08 21:34:56 +00:00
committed by Android Git Automerger

View File

@@ -2648,6 +2648,11 @@ public class NotificationManagerService extends SystemService {
if (speedBumpIndex == -1 &&
// Intrusiveness trumps priority, hence ignore intrusives.
!record.isRecentlyIntrusive() &&
// Currently, package priority is either PRIORITY_DEFAULT or PRIORITY_MAX, so
// scanning for PRIORITY_MIN within the package bucket PRIORITY_DEFAULT
// (or lower as a safeguard) is sufficient to find the speedbump index.
// We'll have to revisit this when more package priority buckets are introduced.
record.getPackagePriority() <= Notification.PRIORITY_DEFAULT &&
record.sbn.getNotification().priority == Notification.PRIORITY_MIN) {
speedBumpIndex = keys.size() - 1;
}