Loading services/core/java/com/android/server/notification/NotificationManagerService.java +13 −11 Original line number Diff line number Diff line Loading @@ -1486,6 +1486,11 @@ public class NotificationManagerService extends SystemService { pkg, opPkg, id, tag, callingUid, callingPid, score, notification, user); NotificationRecord r = new NotificationRecord(n); NotificationRecord old = mNotificationsByKey.get(n.getKey()); if (old != null) { // Retain ranking information from previous record r.copyRankingInformation(old); } if (!mSignalExtractors.isEmpty()) { for (NotificationSignalExtractor extractor : mSignalExtractors) { try { Loading Loading @@ -1514,15 +1519,6 @@ public class NotificationManagerService extends SystemService { } synchronized (mNotificationList) { applyZenModeLocked(r); // Should this notification make noise, vibe, or use the LED? final boolean canInterrupt = (score >= SCORE_INTERRUPTION_THRESHOLD) && !r.isIntercepted(); if (DBG || r.isIntercepted()) Slog.v(TAG, "pkg=" + pkg + " canInterrupt=" + canInterrupt + " intercept=" + r.isIntercepted()); NotificationRecord old = null; int index = indexOfNotificationLocked(n.getKey()); if (index < 0) { mNotificationList.add(r); Loading @@ -1534,12 +1530,18 @@ public class NotificationManagerService extends SystemService { // Make sure we don't lose the foreground service state. notification.flags |= old.getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE; // Retain ranking information from previous record r.copyRankingInformation(old); mNotificationsByKey.remove(old.sbn.getKey()); } mNotificationsByKey.put(n.getKey(), r); applyZenModeLocked(r); // Should this notification make noise, vibe, or use the LED? final boolean canInterrupt = (score >= SCORE_INTERRUPTION_THRESHOLD) && !r.isIntercepted(); if (DBG || r.isIntercepted()) Slog.v(TAG, "pkg=" + pkg + " canInterrupt=" + canInterrupt + " intercept=" + r.isIntercepted()); Collections.sort(mNotificationList, mRankingComparator); // Ensure if this is a foreground service that the proper additional Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +13 −11 Original line number Diff line number Diff line Loading @@ -1486,6 +1486,11 @@ public class NotificationManagerService extends SystemService { pkg, opPkg, id, tag, callingUid, callingPid, score, notification, user); NotificationRecord r = new NotificationRecord(n); NotificationRecord old = mNotificationsByKey.get(n.getKey()); if (old != null) { // Retain ranking information from previous record r.copyRankingInformation(old); } if (!mSignalExtractors.isEmpty()) { for (NotificationSignalExtractor extractor : mSignalExtractors) { try { Loading Loading @@ -1514,15 +1519,6 @@ public class NotificationManagerService extends SystemService { } synchronized (mNotificationList) { applyZenModeLocked(r); // Should this notification make noise, vibe, or use the LED? final boolean canInterrupt = (score >= SCORE_INTERRUPTION_THRESHOLD) && !r.isIntercepted(); if (DBG || r.isIntercepted()) Slog.v(TAG, "pkg=" + pkg + " canInterrupt=" + canInterrupt + " intercept=" + r.isIntercepted()); NotificationRecord old = null; int index = indexOfNotificationLocked(n.getKey()); if (index < 0) { mNotificationList.add(r); Loading @@ -1534,12 +1530,18 @@ public class NotificationManagerService extends SystemService { // Make sure we don't lose the foreground service state. notification.flags |= old.getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE; // Retain ranking information from previous record r.copyRankingInformation(old); mNotificationsByKey.remove(old.sbn.getKey()); } mNotificationsByKey.put(n.getKey(), r); applyZenModeLocked(r); // Should this notification make noise, vibe, or use the LED? final boolean canInterrupt = (score >= SCORE_INTERRUPTION_THRESHOLD) && !r.isIntercepted(); if (DBG || r.isIntercepted()) Slog.v(TAG, "pkg=" + pkg + " canInterrupt=" + canInterrupt + " intercept=" + r.isIntercepted()); Collections.sort(mNotificationList, mRankingComparator); // Ensure if this is a foreground service that the proper additional Loading