Loading services/core/java/com/android/server/notification/NotificationManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,7 @@ public class NotificationManagerService extends SystemService { @VisibleForTesting void clearNotifications() { synchronized (mNotificationList) { synchronized (mNotificationLock) { mEnqueuedNotifications.clear(); mNotificationList.clear(); mNotificationsByKey.clear(); Loading @@ -2301,22 +2301,28 @@ public class NotificationManagerService extends SystemService { @VisibleForTesting void addNotification(NotificationRecord r) { synchronized (mNotificationLock) { mNotificationList.add(r); mNotificationsByKey.put(r.getSbn().getKey(), r); if (r.getSbn().isGroup()) { mSummaryByGroupKey.put(r.getGroupKey(), r); } } } @VisibleForTesting void addEnqueuedNotification(NotificationRecord r) { synchronized (mNotificationLock) { mEnqueuedNotifications.add(r); } } @VisibleForTesting NotificationRecord getNotificationRecord(String key) { synchronized (mNotificationLock) { return mNotificationsByKey.get(key); } } @VisibleForTesting Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +13 −7 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,7 @@ public class NotificationManagerService extends SystemService { @VisibleForTesting void clearNotifications() { synchronized (mNotificationList) { synchronized (mNotificationLock) { mEnqueuedNotifications.clear(); mNotificationList.clear(); mNotificationsByKey.clear(); Loading @@ -2301,22 +2301,28 @@ public class NotificationManagerService extends SystemService { @VisibleForTesting void addNotification(NotificationRecord r) { synchronized (mNotificationLock) { mNotificationList.add(r); mNotificationsByKey.put(r.getSbn().getKey(), r); if (r.getSbn().isGroup()) { mSummaryByGroupKey.put(r.getGroupKey(), r); } } } @VisibleForTesting void addEnqueuedNotification(NotificationRecord r) { synchronized (mNotificationLock) { mEnqueuedNotifications.add(r); } } @VisibleForTesting NotificationRecord getNotificationRecord(String key) { synchronized (mNotificationLock) { return mNotificationsByKey.get(key); } } @VisibleForTesting Loading