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

Commit 7509733c authored by Dan Sandler's avatar Dan Sandler Committed by Justin Koh
Browse files

Elide extras strings from noman dumpsys output.

Bug: 14292528
Change-Id: I19cfb6b692e6901fa7f115ea675b1b03fc5ba176
(cherry picked from commit 44de3cfc08428378b93172a2b03f9785a3638678)
parent ef2b35cc
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -814,19 +814,18 @@ public class NotificationManagerService extends SystemService {
                    if (val == null) {
                        pw.println("null");
                    } else {
                        pw.print(val.toString());
                        if (val instanceof Bitmap) {
                        pw.print(val.getClass().getSimpleName());
                        if (val instanceof CharSequence || val instanceof String) {
                            // redact contents from bugreports
                        } else if (val instanceof Bitmap) {
                            pw.print(String.format(" (%dx%d)",
                                    ((Bitmap) val).getWidth(),
                                    ((Bitmap) val).getHeight()));
                        } else if (val.getClass().isArray()) {
                            pw.println(" {");
                            final int N = Array.getLength(val);
                            for (int i=0; i<N; i++) {
                                if (i > 0) pw.println(",");
                                pw.print(prefix + "      " + Array.get(val, i));
                            }
                            pw.print("\n" + prefix + "    }");
                            pw.println(" (" + N + ")");
                        } else {
                            pw.print(" (" + String.valueOf(val) + ")");
                        }
                        pw.println();
                    }