Elide extras strings from noman dumpsys output.

Bug: 14292528
Change-Id: I19cfb6b692e6901fa7f115ea675b1b03fc5ba176
(cherry picked from commit 44de3cfc08428378b93172a2b03f9785a3638678)
This commit is contained in:
Dan Sandler
2014-05-15 22:22:10 -04:00
committed by Justin Koh
parent ef2b35cc2e
commit 7509733c8d

View File

@@ -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();
}