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

Commit 98fe08fe authored by Erik Wolsheimer's avatar Erik Wolsheimer Committed by android-build-merger
Browse files

fix data race condition BUG: 25819358 am: 2242b4d2 am: 1dbb0355 am: 1d92c453

am: 48543000

* commit '48543000':
  fix data race condition BUG: 25819358
parents 96f0cb67 48543000
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1286,10 +1286,11 @@ public class NotificationManagerService extends SystemService {
                    Binder.getCallingUid(), incomingUserId, true, false,
                    "getAppActiveNotifications", pkg);

            final int N = mNotificationList.size();
            final ArrayList<StatusBarNotification> list = new ArrayList<StatusBarNotification>(N);
            final ArrayList<StatusBarNotification> list
                    = new ArrayList<StatusBarNotification>(mNotificationList.size());

            synchronized (mNotificationList) {
                final int N = mNotificationList.size();
                for (int i = 0; i < N; i++) {
                    final StatusBarNotification sbn = mNotificationList.get(i).sbn;
                    if (sbn.getPackageName().equals(pkg) && sbn.getUserId() == userId) {