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

Commit dbf21119 authored by Jeff DeCew's avatar Jeff DeCew Committed by Automerger Merge Worker
Browse files

Merge "NotificationManagerService: add right lock for some methods." into main am: a64fca58

parents 8a053fe3 a64fca58
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -2408,7 +2408,7 @@ public class NotificationManagerService extends SystemService {
    @VisibleForTesting
    void clearNotifications() {
        synchronized (mNotificationList) {
        synchronized (mNotificationLock) {
            mEnqueuedNotifications.clear();
            mNotificationList.clear();
            mNotificationsByKey.clear();
@@ -2418,22 +2418,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