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

Commit 2a1d77ef authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fixing crash when swiping away last task."

parents d3efe539 3e9964ff
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1273,8 +1273,9 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
            // the next task
            RecentsConfiguration config = Recents.getConfiguration();
            RecentsActivityLaunchState launchState = config.getLaunchState();
            setFocusedTask(taskIndex - 1,
                    !mStack.getTasks().get(taskIndex - 1).isFreeformTask() /* scrollToTask */,
            boolean isFreeformTask = taskIndex > 0 ?
                    mStack.getTasks().get(taskIndex - 1).isFreeformTask() : false;
            setFocusedTask(taskIndex - 1, !isFreeformTask /* scrollToTask */,
                    launchState.launchedWithAltTab);
        }
    }