Elide extras strings from noman dumpsys output.
Bug: 14292528 Change-Id: I19cfb6b692e6901fa7f115ea675b1b03fc5ba176 (cherry picked from commit 44de3cfc08428378b93172a2b03f9785a3638678)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user