Loading services/core/java/com/android/server/wm/RootWindowContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> documentData = isDocument ? intent.getData() : null; if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Looking for task of " + target + " in " + parent); parent.forAllTasks(this); parent.forAllLeafTasks(this); } void clear() { Loading services/core/java/com/android/server/wm/Task.java +19 −1 Original line number Diff line number Diff line Loading @@ -942,7 +942,7 @@ class Task extends WindowContainer<WindowContainer> { return; } affinity = info.taskAffinity; affinity = isLeafTask() ? info.taskAffinity : null; if (intent == null) { // If this task already has an intent associated with it, don't set the root // affinity -- we don't want it changing after initially set, but the initially Loading Loading @@ -3398,6 +3398,24 @@ class Task extends WindowContainer<WindowContainer> { return callback.apply(this); } @Override boolean forAllLeafTasks(Function<Task, Boolean> callback) { boolean isLeafTask = true; for (int i = mChildren.size() - 1; i >= 0; --i) { final Task child = mChildren.get(i).asTask(); if (child != null) { isLeafTask = false; if (child.forAllLeafTasks(callback)) { return true; } } } if (isLeafTask) { return callback.apply(this); } return false; } @Override Task getTask(Predicate<Task> callback, boolean traverseTopToBottom) { final Task t = super.getTask(callback, traverseTopToBottom); Loading services/core/java/com/android/server/wm/WindowContainer.java +9 −0 Original line number Diff line number Diff line Loading @@ -1552,6 +1552,15 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return false; } boolean forAllLeafTasks(Function<Task, Boolean> callback) { for (int i = mChildren.size() - 1; i >= 0; --i) { if (mChildren.get(i).forAllLeafTasks(callback)) { return true; } } return false; } /** * For all tasks at or below this container call the callback. * Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +1 −1 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> documentData = isDocument ? intent.getData() : null; if (DEBUG_TASKS) Slog.d(TAG_TASKS, "Looking for task of " + target + " in " + parent); parent.forAllTasks(this); parent.forAllLeafTasks(this); } void clear() { Loading
services/core/java/com/android/server/wm/Task.java +19 −1 Original line number Diff line number Diff line Loading @@ -942,7 +942,7 @@ class Task extends WindowContainer<WindowContainer> { return; } affinity = info.taskAffinity; affinity = isLeafTask() ? info.taskAffinity : null; if (intent == null) { // If this task already has an intent associated with it, don't set the root // affinity -- we don't want it changing after initially set, but the initially Loading Loading @@ -3398,6 +3398,24 @@ class Task extends WindowContainer<WindowContainer> { return callback.apply(this); } @Override boolean forAllLeafTasks(Function<Task, Boolean> callback) { boolean isLeafTask = true; for (int i = mChildren.size() - 1; i >= 0; --i) { final Task child = mChildren.get(i).asTask(); if (child != null) { isLeafTask = false; if (child.forAllLeafTasks(callback)) { return true; } } } if (isLeafTask) { return callback.apply(this); } return false; } @Override Task getTask(Predicate<Task> callback, boolean traverseTopToBottom) { final Task t = super.getTask(callback, traverseTopToBottom); Loading
services/core/java/com/android/server/wm/WindowContainer.java +9 −0 Original line number Diff line number Diff line Loading @@ -1552,6 +1552,15 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< return false; } boolean forAllLeafTasks(Function<Task, Boolean> callback) { for (int i = mChildren.size() - 1; i >= 0; --i) { if (mChildren.get(i).forAllLeafTasks(callback)) { return true; } } return false; } /** * For all tasks at or below this container call the callback. * Loading