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

Commit 7079a988 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Remove the failed-to-launch activity if attached to a parent" into tm-dev

parents de9e5b56 96395114
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1716,9 +1716,10 @@ class ActivityStarter {
        // If we are not able to proceed, disassociate the activity from the task. Leaving an
        // activity in an incomplete state can lead to issues, such as performing operations
        // without a window container.
        final Task rootTask = mStartActivity.getRootTask();
        if (rootTask != null) {
        if (mStartActivity.getTask() != null) {
            mStartActivity.finishIfPossible("startActivity", true /* oomAdj */);
        } else if (mStartActivity.getParent() != null) {
            mStartActivity.getParent().removeChild(mStartActivity);
        }

        // Root task should also be detached from display and be removed if it's empty.