Loading services/core/java/com/android/server/wm/Task.java +13 −7 Original line number Diff line number Diff line Loading @@ -1837,12 +1837,16 @@ class Task extends WindowContainer<WindowContainer> { return autoRemoveRecents || (!hasChild() && !getHasBeenVisible()); } /** Completely remove all activities associated with an existing task. */ void performClearTask(String reason) { private void clearPinnedTaskIfNeed() { // The original task is to be removed, try remove also the pinned task. if (mChildPipActivity != null && mChildPipActivity.getTask() != null) { mTaskSupervisor.removeRootTask(mChildPipActivity.getTask()); } } /** Completely remove all activities associated with an existing task. */ void performClearTask(String reason) { clearPinnedTaskIfNeed(); // Broken down into to cases to avoid object create due to capturing mStack. if (getRootTask() == null) { forAllActivities((r) -> { Loading Loading @@ -3220,7 +3224,7 @@ class Task extends WindowContainer<WindowContainer> { mRemoving = true; EventLogTags.writeWmTaskRemoved(mTaskId, reason); clearPinnedTaskIfNeed(); // If applicable let the TaskOrganizer know the Task is vanishing. setTaskOrganizer(null); Loading Loading @@ -5439,6 +5443,7 @@ class Task extends WindowContainer<WindowContainer> { // force hidden flag. if (!isForceHidden()) { final Task lastParentBeforePip = topActivity.getLastParentBeforePip(); if (lastParentBeforePip.isAttached()) { topActivity.reparent(lastParentBeforePip, lastParentBeforePip.getChildCount() /* top */, "movePinnedActivityToOriginalTask"); Loading @@ -5446,6 +5451,7 @@ class Task extends WindowContainer<WindowContainer> { } } } } if (creating) { // Nothing else to do if we don't have a window container yet. E.g. call from ctor. Loading Loading
services/core/java/com/android/server/wm/Task.java +13 −7 Original line number Diff line number Diff line Loading @@ -1837,12 +1837,16 @@ class Task extends WindowContainer<WindowContainer> { return autoRemoveRecents || (!hasChild() && !getHasBeenVisible()); } /** Completely remove all activities associated with an existing task. */ void performClearTask(String reason) { private void clearPinnedTaskIfNeed() { // The original task is to be removed, try remove also the pinned task. if (mChildPipActivity != null && mChildPipActivity.getTask() != null) { mTaskSupervisor.removeRootTask(mChildPipActivity.getTask()); } } /** Completely remove all activities associated with an existing task. */ void performClearTask(String reason) { clearPinnedTaskIfNeed(); // Broken down into to cases to avoid object create due to capturing mStack. if (getRootTask() == null) { forAllActivities((r) -> { Loading Loading @@ -3220,7 +3224,7 @@ class Task extends WindowContainer<WindowContainer> { mRemoving = true; EventLogTags.writeWmTaskRemoved(mTaskId, reason); clearPinnedTaskIfNeed(); // If applicable let the TaskOrganizer know the Task is vanishing. setTaskOrganizer(null); Loading Loading @@ -5439,6 +5443,7 @@ class Task extends WindowContainer<WindowContainer> { // force hidden flag. if (!isForceHidden()) { final Task lastParentBeforePip = topActivity.getLastParentBeforePip(); if (lastParentBeforePip.isAttached()) { topActivity.reparent(lastParentBeforePip, lastParentBeforePip.getChildCount() /* top */, "movePinnedActivityToOriginalTask"); Loading @@ -5446,6 +5451,7 @@ class Task extends WindowContainer<WindowContainer> { } } } } if (creating) { // Nothing else to do if we don't have a window container yet. E.g. call from ctor. Loading