Merge "Don't focus view for invalid task index." into mnc-dev
This commit is contained in:
@@ -880,8 +880,10 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start the focus animation when alt-tabbing
|
// Start the focus animation when alt-tabbing
|
||||||
if (mConfig.launchedWithAltTab && !mConfig.launchedHasConfigurationChanged) {
|
ArrayList<Task> tasks = mStack.getTasks();
|
||||||
TaskView tv = getChildViewForTask(mStack.getTasks().get(mFocusedTaskIndex));
|
if (mConfig.launchedWithAltTab && !mConfig.launchedHasConfigurationChanged &&
|
||||||
|
0 <= mFocusedTaskIndex && mFocusedTaskIndex < tasks.size()) {
|
||||||
|
TaskView tv = getChildViewForTask(tasks.get(mFocusedTaskIndex));
|
||||||
if (tv != null) {
|
if (tv != null) {
|
||||||
tv.setFocusedTask(true);
|
tv.setFocusedTask(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user