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

Commit 27ed7d46 authored by Winson Chung's avatar Winson Chung
Browse files

Only remove task if activity fails to start.

Bug: 37501224
Test: Start activity, go home, start activity again
Change-Id: Ic10183ad1af2e588ad342b0fd8ea4ad0b45adf1d
parent 5b895b73
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ 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.
            if (result != START_SUCCESS && mStartActivity.getTask() != null) {
            if (result < START_SUCCESS && mStartActivity.getTask() != null) {
                mStartActivity.getTask().removeActivity(mStartActivity);
            }
            mService.mWindowManager.continueSurfaceLayout();