Moved rebuilding of display WindowList to DisplayContent
Some of this is also in WindowContainer and its children.
However, I hope we can remove the concept of window list in
the future.
Bug: 30060889
Change-Id: I9e531327643c28a0ba35baa812b9c2942993d7b7
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 154bdf5..5c6cb6b 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -684,11 +684,27 @@
return false;
}
+ void onAppTransitionDone() {
+ for (int i = mAppTokens.size() - 1; i >= 0; --i) {
+ final AppWindowToken token = mAppTokens.get(i);
+ token.onAppTransitionDone();
+ }
+ }
+
// TODO: Use WindowContainer.compareTo() once everything is using WindowContainer
boolean isFirstGreaterThanSecond(AppWindowToken first, AppWindowToken second) {
return mAppTokens.indexOf(first) > mAppTokens.indexOf(second);
}
+ int rebuildWindowList(DisplayContent dc, int addIndex) {
+ final int count = mAppTokens.size();
+ for (int i = 0; i < count; i++) {
+ final AppWindowToken token = mAppTokens.get(i);
+ addIndex = token.rebuildWindowList(dc, addIndex);
+ }
+ return addIndex;
+ }
+
void getWindowOnDisplayBeforeToken(DisplayContent dc, WindowToken token,
DisplayContent.GetWindowOnDisplaySearchResults result) {
for (int i = mAppTokens.size() - 1; i >= 0; --i) {
@@ -761,11 +777,24 @@
return "{taskId=" + mTaskId + " appTokens=" + mAppTokens + " mdr=" + mDeferRemoval + "}";
}
+ String getName() {
+ return toShortString();
+ }
+
@Override
public String toShortString() {
return "Task=" + mTaskId;
}
+ void dumpChildrenNames(PrintWriter pw, String prefix) {
+ final String childPrefix = prefix + prefix;
+ for (int i = mAppTokens.size() - 1; i >= 0; --i) {
+ final AppWindowToken token = mAppTokens.get(i);
+ pw.println("#" + i + " " + getName());
+ token.dumpChildrenNames(pw, childPrefix);
+ }
+ }
+
public void dump(String prefix, PrintWriter pw) {
final String doublePrefix = prefix + " ";