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

Commit 3e9964ff authored by Winson's avatar Winson
Browse files

Fixing crash when swiping away last task.

Change-Id: I53e8e619b42ac2069aafce66f74281e72fcffa21
parent 36a5a2c7
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);
        }
    }