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

Commit 81bc02fa authored by Daniel Sandler's avatar Daniel Sandler Committed by android-build-merger
Browse files

Merge "Don't retain the filtered list of notifications." into qt-qpr1-dev

am: 8ea650e1

Change-Id: I0e10618680529bd1f8331be600dd1f89aa12eccd
parents c9a25a2c 8ea650e1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ public class NotificationData {

    private final ArrayMap<String, NotificationEntry> mEntries = new ArrayMap<>();
    private final ArrayList<NotificationEntry> mSortedAndFiltered = new ArrayList<>();
    private final ArrayList<NotificationEntry> mFilteredForUser = new ArrayList<>();

    private final NotificationGroupManager mGroupManager =
            Dependency.get(NotificationGroupManager.class);
@@ -166,20 +165,20 @@ public class NotificationData {
    }

    public ArrayList<NotificationEntry> getNotificationsForCurrentUser() {
        mFilteredForUser.clear();

        synchronized (mEntries) {
            final int len = mEntries.size();
            ArrayList<NotificationEntry> filteredForUser = new ArrayList<>(len);

            for (int i = 0; i < len; i++) {
                NotificationEntry entry = mEntries.valueAt(i);
                final StatusBarNotification sbn = entry.notification;
                if (!getEnvironment().isNotificationForCurrentProfiles(sbn)) {
                    continue;
                }
                mFilteredForUser.add(entry);
                filteredForUser.add(entry);
            }
            return filteredForUser;
        }
        return mFilteredForUser;
    }

    public NotificationEntry get(String key) {