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

Commit a81d9c41 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Synchronize access to mNotificationsByKey"

parents 4832a694 efecc41b
Loading
Loading
Loading
Loading
+26 −24
Original line number Diff line number Diff line
@@ -6674,6 +6674,7 @@ public class NotificationManagerService extends SystemService {
        // package or a registered listener can enqueue.  Prevents DOS attacks and deals with leaks.
        if (!isSystemNotification && !isNotificationFromListener) {
            final int callingUid = Binder.getCallingUid();
            synchronized (mNotificationLock) {
                if (mNotificationsByKey.get(r.getSbn().getKey()) == null
                        && isCallerInstantApp(callingUid, userId)) {
                    // Ephemeral apps have some special constraints for notifications.
@@ -6701,6 +6702,7 @@ public class NotificationManagerService extends SystemService {
                        return false;
                    }
                }
            }

            // limit the number of non-fgs outstanding notificationrecords an app can have
            if (!n.isForegroundService()) {