Loading services/core/java/com/android/server/wm/Task.java +4 −0 Original line number Diff line number Diff line Loading @@ -5058,6 +5058,10 @@ class Task extends WindowContainer<WindowContainer> { } } else { // No longer managed by any organizer. final TaskDisplayArea taskDisplayArea = getDisplayArea(); if (taskDisplayArea != null) { taskDisplayArea.removeLaunchRootTask(this); } setForceHidden(FLAG_FORCE_HIDDEN_FOR_TASK_ORG, false /* set */); if (mCreatedByOrganizer) { removeImmediately("setTaskOrganizer"); Loading services/core/java/com/android/server/wm/TaskDisplayArea.java +18 −6 Original line number Diff line number Diff line Loading @@ -1135,12 +1135,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { "Can't set not mCreatedByOrganizer as launch root tr=" + rootTask); } LaunchRootTaskDef def = null; for (int i = mLaunchRootTasks.size() - 1; i >= 0; --i) { if (mLaunchRootTasks.get(i).task.mTaskId != rootTask.mTaskId) continue; def = mLaunchRootTasks.get(i); } LaunchRootTaskDef def = getLaunchRootTaskDef(rootTask); if (def != null) { // Remove so we add to the end of the list. mLaunchRootTasks.remove(def); Loading @@ -1156,6 +1151,23 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { } } void removeLaunchRootTask(Task rootTask) { LaunchRootTaskDef def = getLaunchRootTaskDef(rootTask); if (def != null) { mLaunchRootTasks.remove(def); } } private @Nullable LaunchRootTaskDef getLaunchRootTaskDef(Task rootTask) { LaunchRootTaskDef def = null; for (int i = mLaunchRootTasks.size() - 1; i >= 0; --i) { if (mLaunchRootTasks.get(i).task.mTaskId != rootTask.mTaskId) continue; def = mLaunchRootTasks.get(i); break; } return def; } Task getLaunchRootTask(int windowingMode, int activityType, ActivityOptions options) { // Try to use the launch root task in options if available. if (options != null) { Loading Loading
services/core/java/com/android/server/wm/Task.java +4 −0 Original line number Diff line number Diff line Loading @@ -5058,6 +5058,10 @@ class Task extends WindowContainer<WindowContainer> { } } else { // No longer managed by any organizer. final TaskDisplayArea taskDisplayArea = getDisplayArea(); if (taskDisplayArea != null) { taskDisplayArea.removeLaunchRootTask(this); } setForceHidden(FLAG_FORCE_HIDDEN_FOR_TASK_ORG, false /* set */); if (mCreatedByOrganizer) { removeImmediately("setTaskOrganizer"); Loading
services/core/java/com/android/server/wm/TaskDisplayArea.java +18 −6 Original line number Diff line number Diff line Loading @@ -1135,12 +1135,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { "Can't set not mCreatedByOrganizer as launch root tr=" + rootTask); } LaunchRootTaskDef def = null; for (int i = mLaunchRootTasks.size() - 1; i >= 0; --i) { if (mLaunchRootTasks.get(i).task.mTaskId != rootTask.mTaskId) continue; def = mLaunchRootTasks.get(i); } LaunchRootTaskDef def = getLaunchRootTaskDef(rootTask); if (def != null) { // Remove so we add to the end of the list. mLaunchRootTasks.remove(def); Loading @@ -1156,6 +1151,23 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { } } void removeLaunchRootTask(Task rootTask) { LaunchRootTaskDef def = getLaunchRootTaskDef(rootTask); if (def != null) { mLaunchRootTasks.remove(def); } } private @Nullable LaunchRootTaskDef getLaunchRootTaskDef(Task rootTask) { LaunchRootTaskDef def = null; for (int i = mLaunchRootTasks.size() - 1; i >= 0; --i) { if (mLaunchRootTasks.get(i).task.mTaskId != rootTask.mTaskId) continue; def = mLaunchRootTasks.get(i); break; } return def; } Task getLaunchRootTask(int windowingMode, int activityType, ActivityOptions options) { // Try to use the launch root task in options if available. if (options != null) { Loading