diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index a7bfc40ca7a8..b266eaacae10 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -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); } } |