Clean up NotifCollection logging slightly.

Test: dumpsysui NotifCollection ShadeListBuilder
Bug: 236140753
Change-Id: I50c573969b3d012f8858058c6b3544e78874d35b
This commit is contained in:
Jeff DeCew
2022-05-19 17:18:20 +00:00
parent 483aff40f3
commit 7d2bee7b5a
2 changed files with 5 additions and 5 deletions

View File

@@ -115,6 +115,7 @@ public class ListDumper {
) {
sb.append(indent)
.append("[").append(index).append("] ")
.append(index.length() == 1 ? " " : "")
.append(entry.getKey());
if (includeParent) {
@@ -192,7 +193,7 @@ public class ListDumper {
if (notifEntry.getAttachState().getSuppressedChanges().getSection() != null) {
rksb.append("suppressedSection=")
.append(notifEntry.getAttachState().getSuppressedChanges()
.getSection())
.getSection().getLabel())
.append(" ");
}

View File

@@ -104,6 +104,7 @@ import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -829,11 +830,9 @@ public class NotifCollection implements Dumpable {
@Override
public void dump(PrintWriter pw, @NonNull String[] args) {
final List<NotificationEntry> entries = new ArrayList<>(getAllNotifs());
entries.sort(Comparator.comparing(NotificationEntry::getKey));
pw.println("\t" + TAG + " unsorted/unfiltered notifications:");
if (entries.size() == 0) {
pw.println("\t\t None");
}
pw.println("\t" + TAG + " unsorted/unfiltered notifications: " + entries.size());
pw.println(
ListDumper.dumpList(
entries,