Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99c49c5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "don't call the reparent method when the old parent of task is removed."...

Merge "don't call the reparent method when the old parent of task is removed." into main am: 8ce3a826 am: 9249b8dc

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3446630



Change-Id: I6840444865d0e3529555fac9f4c9000093b67839
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 15e6ffaf 9249b8dc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1664,6 +1664,12 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
        activityIdleInternal(null /* idleActivity */, false /* fromTimeout */,
                true /* processPausingActivities */, null /* configuration */);

        if (rootTask.getParent() == null) {
            // The activities in the task may already be finishing. Then the task could be removed
            // when performing the idle check.
            return;
        }

        // Reparent all the tasks to the bottom of the display
        final DisplayContent toDisplay =
                mRootWindowContainer.getDisplayContent(DEFAULT_DISPLAY);