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

Commit 15b3922a authored by d34d's avatar d34d Committed by Gerrit Code Review
Browse files

SysUI: Clear notification data when recreating status bar

This ensures we don't get an IndexOutOfBounds exception  in
StatusBarIconController when adding the notifications back in.

Change-Id: I70ffd487223f95642ccdb41e9e5a3dde3ba6990d
TICKET: CYNGNOS-2215
parent 39a09c54
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -3733,14 +3733,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
        int nNotifs = mNotificationData.size();
        ArrayList<Pair<String, StatusBarNotification>> notifications = new ArrayList<>(nNotifs);
        copyNotifications(notifications, mNotificationData);
        // now remove all the notification views since we'll be re-inflating these with the copied
        // data
        for (int i = 0; i < nNotifs; i++) {
            final NotificationData.Entry entry = mNotificationData.get(i);
            if (entry != null) {
                removeNotificationViews(entry.key, rankingMap);
            }
        }
        // now remove all the notifications since we'll be re-creating these with the copied data
        mNotificationData.clear();

        if (mCustomTileListenerService != null) {
            try {