Merge "Call WindowContainer#dump in all levels" into rvc-dev am: a7642cd37b am: 92eff334d4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11733428

Change-Id: I25c93a6a6a2d3ae59c244e2e6bb198b1ff27789f
This commit is contained in:
TreeHugger Robot
2020-06-10 05:40:49 +00:00
committed by Automerger Merge Worker
8 changed files with 35 additions and 39 deletions

View File

@@ -7540,7 +7540,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
public String toString() {
if (stringName != null) {
return stringName + " t" + (task == null ? INVALID_TASK_ID : task.mTaskId) +
(finishing ? " f}" : "") + (mIsExiting ? " mIsExiting=" : "") + "}";
(finishing ? " f}" : "") + (mIsExiting ? " isExiting" : "") + "}";
}
StringBuilder sb = new StringBuilder(128);
sb.append("ActivityRecord{");

View File

@@ -3232,22 +3232,22 @@ class ActivityStack extends Task {
@Override
void dump(PrintWriter pw, String prefix, boolean dumpAll) {
pw.println(prefix + "mStackId=" + getRootTaskId());
pw.println(prefix + "mDeferRemoval=" + mDeferRemoval);
pw.println(prefix + "mBounds=" + getRawBounds().toShortString());
for (int taskNdx = mChildren.size() - 1; taskNdx >= 0; taskNdx--) {
mChildren.get(taskNdx).dump(pw, prefix + " ", dumpAll);
if (mDeferRemoval) {
pw.println(prefix + "mDeferRemoval=true");
}
super.dump(pw, prefix, dumpAll);
if (!mExitingActivities.isEmpty()) {
pw.println();
pw.println(" Exiting application tokens:");
pw.println(prefix + "Exiting application tokens:");
final String doublePrefix = prefix + " ";
for (int i = mExitingActivities.size() - 1; i >= 0; i--) {
WindowToken token = mExitingActivities.get(i);
pw.print(" Exiting App #"); pw.print(i);
pw.print(doublePrefix + "Exiting App #" + i);
pw.print(' '); pw.print(token);
pw.println(':');
token.dump(pw, " ", dumpAll);
token.dump(pw, doublePrefix, dumpAll);
}
pw.println();
}
mAnimatingActivityRegistry.dump(pw, "AnimatingApps:", prefix);
}

View File

@@ -1886,7 +1886,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
public void dump(PrintWriter pw, String prefix) {
pw.println();
pw.println("ActivityStackSupervisor state:");
mRootWindowContainer.dump(pw, prefix);
mRootWindowContainer.dump(pw, prefix, true /* dumpAll */);
getKeyguardController().dump(pw, prefix);
mService.getLockTaskController().dump(pw, prefix);
pw.print(prefix);

View File

@@ -2977,12 +2977,10 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
pw.println();
mWallpaperController.dump(pw, " ");
pw.println();
pw.print("mSystemGestureExclusion=");
if (mSystemGestureExclusionListeners.getRegisteredCallbackCount() > 0) {
pw.println();
pw.print(" mSystemGestureExclusion=");
pw.println(mSystemGestureExclusion);
} else {
pw.println("<no lstnrs>");
}
pw.println();

View File

@@ -3570,12 +3570,14 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
}
}
public void dump(PrintWriter pw, String prefix) {
@Override
public void dump(PrintWriter pw, String prefix, boolean dumpAll) {
super.dump(pw, prefix, dumpAll);
pw.print(prefix);
pw.println("topDisplayFocusedStack=" + getTopDisplayFocusedStack());
for (int i = getChildCount() - 1; i >= 0; --i) {
final DisplayContent display = getChildAt(i);
display.dump(pw, prefix, true /* dumpAll */);
display.dump(pw, prefix, dumpAll);
}
pw.println();
}

View File

@@ -428,16 +428,11 @@ class SurfaceAnimator {
void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("mLeash="); pw.print(mLeash);
if (mAnimationStartDelayed) {
pw.print(" mAnimationStartDelayed="); pw.println(mAnimationStartDelayed);
} else {
pw.println();
}
pw.print(prefix); pw.println("Animation:");
pw.print(" mAnimationType=" + mAnimationType);
pw.println(mAnimationStartDelayed ? " mAnimationStartDelayed=true" : "");
pw.print(prefix); pw.print("Animation: "); pw.println(mAnimation);
if (mAnimation != null) {
mAnimation.dump(pw, prefix + " ");
} else {
pw.print(prefix); pw.println("null");
}
}

View File

@@ -3519,20 +3519,17 @@ class Task extends WindowContainer<WindowContainer> {
@Override
void dump(PrintWriter pw, String prefix, boolean dumpAll) {
super.dump(pw, prefix, dumpAll);
pw.println(prefix + "bounds=" + getBounds().toShortString());
final String doublePrefix = prefix + " ";
pw.println(prefix + "taskId=" + mTaskId);
pw.println(doublePrefix + "mBounds=" + getBounds().toShortString());
pw.println(doublePrefix + "appTokens=" + mChildren);
final String triplePrefix = doublePrefix + " ";
final String quadruplePrefix = triplePrefix + " ";
int[] index = { 0 };
forAllActivities((r) -> {
pw.println(triplePrefix + "Activity #" + index[0]++ + " " + r);
r.dump(pw, quadruplePrefix, dumpAll);
});
for (int i = mChildren.size() - 1; i >= 0; i--) {
final WindowContainer<?> child = mChildren.get(i);
pw.println(prefix + "* " + child);
// Only dump non-activity because full activity info is already printed by
// RootWindowContainer#dumpActivities.
if (child.asActivityRecord() == null) {
child.dump(pw, doublePrefix, dumpAll);
}
}
}
/**

View File

@@ -1772,16 +1772,20 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> {
@Override
void dump(PrintWriter pw, String prefix, boolean dumpAll) {
pw.println(prefix + "TaskDisplayArea " + getName());
super.dump(pw, prefix, dumpAll);
if (mPreferredTopFocusableStack != null) {
pw.println(prefix + " mPreferredTopFocusableStack=" + mPreferredTopFocusableStack);
}
if (mLastFocusedStack != null) {
pw.println(prefix + " mLastFocusedStack=" + mLastFocusedStack);
}
pw.println(prefix + " Application tokens in top down Z order:");
final String doublePrefix = prefix + " ";
final String triplePrefix = doublePrefix + " ";
pw.println(doublePrefix + "Application tokens in top down Z order:");
for (int stackNdx = getChildCount() - 1; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = getChildAt(stackNdx);
stack.dump(pw, prefix + " ", dumpAll);
pw.println(doublePrefix + "* " + stack);
stack.dump(pw, triplePrefix, dumpAll);
}
}
}