Loading services/core/java/com/android/server/wm/TaskDisplayArea.java +9 −11 Original line number Diff line number Diff line Loading @@ -1095,29 +1095,27 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { return rootTask; } } else if (candidateTask != null) { final Task rootTask = candidateTask; final int position = onTop ? POSITION_TOP : POSITION_BOTTOM; final Task launchRootTask = getLaunchRootTask(windowingMode, activityType, options, sourceTask, launchFlags); if (launchRootTask != null) { if (rootTask.getParent() == null) { launchRootTask.addChild(rootTask, position); } else if (rootTask.getParent() != launchRootTask) { rootTask.reparent(launchRootTask, position); } } else if (rootTask.getDisplayArea() != this || !rootTask.isRootTask()) { if (rootTask.getParent() == null) { addChild(rootTask, position); if (candidateTask.getParent() == null) { launchRootTask.addChild(candidateTask, position); } else if (candidateTask.getParent() != launchRootTask) { candidateTask.reparent(launchRootTask, position); } } else if (candidateTask.getDisplayArea() != this || !candidateTask.isRootTask()) { if (candidateTask.getParent() == null) { addChild(candidateTask, position); } else { rootTask.reparent(this, onTop); candidateTask.reparent(this, onTop); } } // Update windowing mode if necessary, e.g. moving a pinned task to fullscreen. if (candidateTask.getWindowingMode() != windowingMode) { candidateTask.setWindowingMode(windowingMode); } return rootTask; return candidateTask.getRootTask(); } return new Task.Builder(mAtmService) .setWindowingMode(windowingMode) Loading services/core/java/com/android/server/wm/WindowContainer.java +4 −0 Original line number Diff line number Diff line Loading @@ -354,6 +354,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< throw new IllegalArgumentException("reparent: can't reparent to null " + this); } if (newParent == this) { throw new IllegalArgumentException("Can not reparent to itself " + this); } final WindowContainer oldParent = mParent; if (mParent == newParent) { throw new IllegalArgumentException("WC=" + this + " already child of " + mParent); Loading Loading
services/core/java/com/android/server/wm/TaskDisplayArea.java +9 −11 Original line number Diff line number Diff line Loading @@ -1095,29 +1095,27 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { return rootTask; } } else if (candidateTask != null) { final Task rootTask = candidateTask; final int position = onTop ? POSITION_TOP : POSITION_BOTTOM; final Task launchRootTask = getLaunchRootTask(windowingMode, activityType, options, sourceTask, launchFlags); if (launchRootTask != null) { if (rootTask.getParent() == null) { launchRootTask.addChild(rootTask, position); } else if (rootTask.getParent() != launchRootTask) { rootTask.reparent(launchRootTask, position); } } else if (rootTask.getDisplayArea() != this || !rootTask.isRootTask()) { if (rootTask.getParent() == null) { addChild(rootTask, position); if (candidateTask.getParent() == null) { launchRootTask.addChild(candidateTask, position); } else if (candidateTask.getParent() != launchRootTask) { candidateTask.reparent(launchRootTask, position); } } else if (candidateTask.getDisplayArea() != this || !candidateTask.isRootTask()) { if (candidateTask.getParent() == null) { addChild(candidateTask, position); } else { rootTask.reparent(this, onTop); candidateTask.reparent(this, onTop); } } // Update windowing mode if necessary, e.g. moving a pinned task to fullscreen. if (candidateTask.getWindowingMode() != windowingMode) { candidateTask.setWindowingMode(windowingMode); } return rootTask; return candidateTask.getRootTask(); } return new Task.Builder(mAtmService) .setWindowingMode(windowingMode) Loading
services/core/java/com/android/server/wm/WindowContainer.java +4 −0 Original line number Diff line number Diff line Loading @@ -354,6 +354,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< throw new IllegalArgumentException("reparent: can't reparent to null " + this); } if (newParent == this) { throw new IllegalArgumentException("Can not reparent to itself " + this); } final WindowContainer oldParent = mParent; if (mParent == newParent) { throw new IllegalArgumentException("WC=" + this + " already child of " + mParent); Loading