From 229b07808ff7d5a3d16628922ea5c315ed79681b Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Fri, 6 May 2022 15:21:42 +0000 Subject: [PATCH] Improve dumps/logs to diagnose mis-ordered group children Fixes: 204817567 Test: dumpsysui NotifLog ShadeListBuilder NotifCollection Change-Id: I4d7f0497451572a7660607cb83b4e08c39b04db7 --- .../statusbar/notification/collection/ListDumper.java | 6 ++++++ .../notification/collection/listbuilder/NotifSection.kt | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java index 6be8a491eeadd..e98ae8db41221 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java @@ -121,6 +121,12 @@ public class ListDumper { sb.append(" (parent=") .append(entry.getParent() != null ? entry.getParent().getKey() : null) .append(")"); + + NotificationEntry notifEntry = entry.getRepresentativeEntry(); + if (notifEntry != null) { + sb.append(" rank=") + .append(notifEntry.getRanking().getRank()); + } } if (entry.getSection() != null) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/NotifSection.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/NotifSection.kt index 263737e20a133..ea66f3b6dd429 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/NotifSection.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/listbuilder/NotifSection.kt @@ -25,12 +25,9 @@ data class NotifSection( val sectioner: NotifSectioner, val index: Int ) { - val label: String - get() = "Section($index, $bucket, \"${sectioner.name}\")" - + @PriorityBucket + val bucket: Int = sectioner.bucket + val label: String = "$index:$bucket:${sectioner.name}" val headerController: NodeController? = sectioner.headerNodeController - val comparator: NotifComparator? = sectioner.comparator - - @PriorityBucket val bucket: Int = sectioner.bucket }