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

Commit 500a6b0c authored by Justin Koh's avatar Justin Koh
Browse files

Revert "Add check to allow notification listener packages to post >50 notifications"

Broke build.

This reverts commit 2dbd36fc.

Change-Id: I2fdf1de21b6598f85bbd94acef44e771b2df9f42
parent 2dbd36fc
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1729,15 +1729,14 @@ public class NotificationManagerService extends SystemService {
        }
        checkCallerIsSystemOrSameApp(pkg);
        final boolean isSystemNotification = isUidSystem(callingUid) || ("android".equals(pkg));
        final boolean isNotificationFromListener = mEnabledListenerPackageNames.contains(pkg);

        final int userId = ActivityManager.handleIncomingUser(callingPid,
                callingUid, incomingUserId, true, false, "enqueueNotification", pkg);
        final UserHandle user = new UserHandle(userId);

        // Limit the number of notifications that any given package except the android
        // package or a registered listener can enqueue.  Prevents DOS attacks and deals with leaks.
        if (!isSystemNotification && !isNotificationFromListener) {
        // package can enqueue.  Prevents DOS attacks and deals with leaks.
        if (!isSystemNotification) {
            synchronized (mNotificationList) {
                int count = 0;
                final int N = mNotificationList.size();