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

Commit 12af62ac authored by Pragya Bajoria's avatar Pragya Bajoria Committed by Automerger Merge Worker
Browse files

Merge "Crash during Task switch" into main am: 441f3367

parents 170690ab 441f3367
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -529,9 +529,12 @@ public class TaskViewTaskController implements ShellTaskOrganizer.TaskListener {
            Slog.w(TAG, "Trying to remove a task that was never added? (no taskToken)");
            return;
        }
        // Cache it to avoid NPE and make sure to remove it from recents history.
        // mTaskToken can be cleared in onTaskVanished() when the task is removed.
        final WindowContainerToken taskToken = mTaskToken;
        mShellExecutor.execute(() -> {
            WindowContainerTransaction wct = new WindowContainerTransaction();
            wct.removeTask(mTaskToken);
            wct.removeTask(taskToken);
            mTaskViewTransitions.closeTaskView(wct, this);
        });
    }