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

Commit efecc41b authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Synchronize access to mNotificationsByKey

Test: manual, launch FGSes
Fixes: 214264027
Change-Id: I1fc8c96da7bf7b455ad1059601bf242907796930
parent ad88b155
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()) {