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

Commit 6704d6e8 authored by Bryce Lee's avatar Bryce Lee Committed by android-build-merger
Browse files

Merge "Do not remove task until all activities have been destroyed." into oc-dev

am: f18c5862

Change-Id: Id35bc99e1c6871fc16935f901710c2f7b1fc567e
parents 407e77c2 f18c5862
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4053,8 +4053,12 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
                mStackSupervisor.removeTaskByIdLocked(task.taskId, false /* killProcess */,
                        !REMOVE_FROM_RECENTS, PAUSE_IMMEDIATELY);
            }

            // We must keep the task around until all activities are destroyed.
            if (lastActivity) {
                removeTask(task, reason, REMOVE_TASK_MODE_DESTROYING);
            }
        }
        cleanUpActivityServicesLocked(r);
        r.removeUriPermissionsLocked();
    }