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

Commit f18c5862 authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

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

parents ef4e38f9 1d930584
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();
    }