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

Commit fbac2141 authored by Christoph Studer's avatar Christoph Studer
Browse files

NoMan: Fix speedbump with multiple package priorities

Bug: 16782616
Change-Id: I747dc981f7974720da9f277ec6e3fba31c21f226
parent f363bda2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2647,6 +2647,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;
            }