OSDN Git Service

NoMan: Fix speedbump for PRIORITY_MIN intrusives
authorChristoph Studer <chstuder@google.com>
Fri, 5 Sep 2014 09:40:01 +0000 (11:40 +0200)
committerChristoph Studer <chstuder@google.com>
Fri, 5 Sep 2014 14:11:37 +0000 (14:11 +0000)
Bug: 16782616
Change-Id: I35fb875bed8cbd90ecd37edc8973c1771be3584d

services/core/java/com/android/server/notification/NotificationManagerService.java

index 0794edf..a66d34b 100644 (file)
@@ -2636,7 +2636,10 @@ public class NotificationManagerService extends SystemService {
                 visibilityOverrides.putInt(record.sbn.getKey(),
                         record.getPackageVisibilityOverride());
             }
+            // Find first min-prio notification for speedbump placement.
             if (speedBumpIndex == -1 &&
+                    // Intrusiveness trumps priority, hence ignore intrusives.
+                    !record.isRecentlyIntrusive() &&
                     record.sbn.getNotification().priority == Notification.PRIORITY_MIN) {
                 speedBumpIndex = keys.size() - 1;
             }