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

Commit 7d2bee7b authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Clean up NotifCollection logging slightly.

Test: dumpsysui NotifCollection ShadeListBuilder
Bug: 236140753
Change-Id: I50c573969b3d012f8858058c6b3544e78874d35b
parent 483aff40
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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(" ");
            }

+3 −4
Original line number Diff line number Diff line
@@ -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,