Improved output for 'dumpsys window displays'
New format makes it easier to parse during CTS testing.
Bug: 19225708
Change-Id: Ia9a75ca92b6c10eefcb07cabea9852e514807b08
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 223e03a..72970f6 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -603,12 +603,23 @@
return "Task=" + mTaskId;
}
- public void printTo(String prefix, PrintWriter pw) {
- pw.print(prefix); pw.print("taskId="); pw.println(mTaskId);
- pw.print(prefix + prefix); pw.print("mFullscreen="); pw.println(mFullscreen);
- pw.print(prefix + prefix); pw.print("mBounds="); pw.println(mBounds.toShortString());
- pw.print(prefix + prefix); pw.print("mdr="); pw.println(mDeferRemoval);
- pw.print(prefix + prefix); pw.print("appTokens="); pw.println(mAppTokens);
- pw.print(prefix + prefix); pw.print("mTempInsetBounds="); pw.println(mTempInsetBounds);
+ public void dump(String prefix, PrintWriter pw) {
+ final String doublePrefix = prefix + " ";
+
+ pw.println(prefix + "taskId=" + mTaskId);
+ pw.println(doublePrefix + "mFullscreen=" + mFullscreen);
+ pw.println(doublePrefix + "mBounds=" + mBounds.toShortString());
+ pw.println(doublePrefix + "mdr=" + mDeferRemoval);
+ pw.println(doublePrefix + "appTokens=" + mAppTokens);
+ pw.println(doublePrefix + "mTempInsetBounds=" + mTempInsetBounds.toShortString());
+
+ final String triplePrefix = doublePrefix + " ";
+
+ for (int i = mAppTokens.size() - 1; i >= 0; i--) {
+ final AppWindowToken wtoken = mAppTokens.get(i);
+ pw.println(triplePrefix + "Activity #" + i + " " + wtoken);
+ wtoken.dump(pw, triplePrefix);
+ }
+
}
}