Merge "Dump display area hierarchy"
This commit is contained in:
@@ -157,6 +157,11 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> {
|
||||
mResolvedOverrideConfiguration.setTo(mRequestedOverrideConfiguration);
|
||||
}
|
||||
|
||||
/** Returns {@code true} if requested override override configuration is not empty. */
|
||||
boolean hasRequestedOverrideConfiguration() {
|
||||
return mHasOverrideConfiguration;
|
||||
}
|
||||
|
||||
/** Returns requested override configuration applied to this configuration container. */
|
||||
public Configuration getRequestedOverrideConfiguration() {
|
||||
return mRequestedOverrideConfiguration;
|
||||
|
||||
@@ -263,6 +263,26 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
|
||||
if (mIgnoreOrientationRequest) {
|
||||
pw.println(prefix + "mIgnoreOrientationRequest=true");
|
||||
}
|
||||
if (hasRequestedOverrideConfiguration()) {
|
||||
pw.println(prefix + "overrideConfig=" + getRequestedOverrideConfiguration());
|
||||
}
|
||||
}
|
||||
|
||||
void dumpChildDisplayArea(PrintWriter pw, String prefix, boolean dumpAll) {
|
||||
final String doublePrefix = prefix + " ";
|
||||
for (int i = getChildCount() - 1; i >= 0; i--) {
|
||||
final DisplayArea<?> childArea = getChildAt(i).asDisplayArea();
|
||||
if (childArea == null) {
|
||||
continue;
|
||||
}
|
||||
pw.println(prefix + "* " + childArea.getName());
|
||||
if (childArea.isTaskDisplayArea()) {
|
||||
// TaskDisplayArea can only contain task. And it is already printed by display.
|
||||
continue;
|
||||
}
|
||||
childArea.dump(pw, doublePrefix, dumpAll);
|
||||
childArea.dumpChildDisplayArea(pw, doublePrefix, dumpAll);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2984,6 +2984,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
pw.println(mSystemGestureExclusion);
|
||||
}
|
||||
|
||||
pw.println();
|
||||
pw.println(prefix + "Display areas in top down Z order:");
|
||||
dumpChildDisplayArea(pw, subPrefix, dumpAll);
|
||||
|
||||
pw.println();
|
||||
pw.println(prefix + "Task display areas in top down Z order:");
|
||||
forAllTaskDisplayAreas(taskDisplayArea -> {
|
||||
|
||||
Reference in New Issue
Block a user