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

Commit 5c6d3687 authored by Ned Burns's avatar Ned Burns Committed by Android (Google) Code Review
Browse files

Merge "Don't crash if we're given an incomplete ranking"

parents a51778da 1cbef0b2
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
@@ -308,7 +308,12 @@ public class NotifCollection implements Dumpable {
    private void applyRanking(@NonNull RankingMap rankingMap) {
        for (NotificationEntry entry : mNotificationSet.values()) {
            if (!isLifetimeExtended(entry)) {
                Ranking ranking = requireRanking(rankingMap, entry.getKey());

                // TODO: (b/148791039) We should crash if we are ever handed a ranking with
                //  incomplete entries. Right now, there's a race condition in NotificationListener
                //  that means this might occur when SystemUI is starting up.
                Ranking ranking = new Ranking();
                if (rankingMap.getRanking(entry.getKey(), ranking)) {
                    entry.setRanking(ranking);

                    // TODO: (b/145659174) update the sbn's overrideGroupKey in
@@ -324,6 +329,7 @@ public class NotifCollection implements Dumpable {
                }
            }
        }
    }

    private void rebuildList() {
        if (mBuildListener != null) {