Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coalescer/GroupCoalescer.java +7 −4 Original line number Diff line number Diff line Loading @@ -260,11 +260,14 @@ public class GroupCoalescer implements Dumpable { private void applyRanking(RankingMap rankingMap) { for (CoalescedEvent event : mCoalescedEvents.values()) { Ranking ranking = new Ranking(); if (!rankingMap.getRanking(event.getKey(), ranking)) { throw new IllegalStateException( "Ranking map doesn't contain key: " + event.getKey()); } if (rankingMap.getRanking(event.getKey(), ranking)) { event.setRanking(ranking); } else { // 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. mLogger.logMissingRanking(event.getKey()); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coalescer/GroupCoalescerLogger.kt +8 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,14 @@ class GroupCoalescerLogger @Inject constructor( "Modification of notif $str1 triggered TIMEOUT emit of batched group $str2" }) } fun logMissingRanking(forKey: String) { buffer.log(TAG, LogLevel.WARNING, { str1 = forKey }, { "RankingMap is missing an entry for coalesced notification $str1" }) } } private const val TAG = "GroupCoalescer" No newline at end of file Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coalescer/GroupCoalescer.java +7 −4 Original line number Diff line number Diff line Loading @@ -260,11 +260,14 @@ public class GroupCoalescer implements Dumpable { private void applyRanking(RankingMap rankingMap) { for (CoalescedEvent event : mCoalescedEvents.values()) { Ranking ranking = new Ranking(); if (!rankingMap.getRanking(event.getKey(), ranking)) { throw new IllegalStateException( "Ranking map doesn't contain key: " + event.getKey()); } if (rankingMap.getRanking(event.getKey(), ranking)) { event.setRanking(ranking); } else { // 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. mLogger.logMissingRanking(event.getKey()); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coalescer/GroupCoalescerLogger.kt +8 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,14 @@ class GroupCoalescerLogger @Inject constructor( "Modification of notif $str1 triggered TIMEOUT emit of batched group $str2" }) } fun logMissingRanking(forKey: String) { buffer.log(TAG, LogLevel.WARNING, { str1 = forKey }, { "RankingMap is missing an entry for coalesced notification $str1" }) } } private const val TAG = "GroupCoalescer" No newline at end of file