Loading quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -204,12 +204,11 @@ public class TaskbarUIController { if (foundTaskView != null) { if (foundTaskView != null) { // There is already a running app of this type, use that as second app. // There is already a running app of this type, use that as second app. // Get index of task (0 or 1), in case it's a GroupedTaskView // Get index of task (0 or 1), in case it's a GroupedTaskView int indexOfTask = foundTaskView.getIndexOfTask(foundTask.key.id); TaskIdAttributeContainer taskAttributes = TaskIdAttributeContainer taskAttributes = foundTaskView.getTaskIdAttributeContainers()[indexOfTask]; foundTaskView.getTaskAttributesById(foundTask.key.id); recents.confirmSplitSelect( recents.confirmSplitSelect( foundTaskView, foundTaskView, taskAttributes.getTask(), foundTask, taskAttributes.getIconView().getDrawable(), taskAttributes.getIconView().getDrawable(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView().getThumbnail(), taskAttributes.getThumbnailView().getThumbnail(), Loading quickstep/src/com/android/quickstep/views/TaskView.java +9 −7 Original line number Original line Diff line number Diff line Loading @@ -602,16 +602,18 @@ public class TaskView extends FrameLayout implements Reusable { } } /** /** * Finds the index of a given taskId within this TaskView, or -1 if the TaskView does not * Returns the TaskIdAttributeContainer corresponding to a given taskId, or null if the TaskView * contain it. For grouped tasks (of two), this is 0 or 1; for solo tasks, it is 0. * does not contain a Task with that ID. */ */ public int getIndexOfTask(int taskId) { @Nullable for (int i = 0; i < mTaskIdContainer.length; i++) { public TaskIdAttributeContainer getTaskAttributesById(int taskId) { if (mTaskIdContainer[i] == taskId) { for (TaskIdAttributeContainer attributes : mTaskIdAttributeContainer) { return i; if (attributes.getTask().key.id == taskId) { return attributes; } } } } return -1; return null; } } public TaskThumbnailView getThumbnail() { public TaskThumbnailView getThumbnail() { Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarUIController.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -204,12 +204,11 @@ public class TaskbarUIController { if (foundTaskView != null) { if (foundTaskView != null) { // There is already a running app of this type, use that as second app. // There is already a running app of this type, use that as second app. // Get index of task (0 or 1), in case it's a GroupedTaskView // Get index of task (0 or 1), in case it's a GroupedTaskView int indexOfTask = foundTaskView.getIndexOfTask(foundTask.key.id); TaskIdAttributeContainer taskAttributes = TaskIdAttributeContainer taskAttributes = foundTaskView.getTaskIdAttributeContainers()[indexOfTask]; foundTaskView.getTaskAttributesById(foundTask.key.id); recents.confirmSplitSelect( recents.confirmSplitSelect( foundTaskView, foundTaskView, taskAttributes.getTask(), foundTask, taskAttributes.getIconView().getDrawable(), taskAttributes.getIconView().getDrawable(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView(), taskAttributes.getThumbnailView().getThumbnail(), taskAttributes.getThumbnailView().getThumbnail(), Loading
quickstep/src/com/android/quickstep/views/TaskView.java +9 −7 Original line number Original line Diff line number Diff line Loading @@ -602,16 +602,18 @@ public class TaskView extends FrameLayout implements Reusable { } } /** /** * Finds the index of a given taskId within this TaskView, or -1 if the TaskView does not * Returns the TaskIdAttributeContainer corresponding to a given taskId, or null if the TaskView * contain it. For grouped tasks (of two), this is 0 or 1; for solo tasks, it is 0. * does not contain a Task with that ID. */ */ public int getIndexOfTask(int taskId) { @Nullable for (int i = 0; i < mTaskIdContainer.length; i++) { public TaskIdAttributeContainer getTaskAttributesById(int taskId) { if (mTaskIdContainer[i] == taskId) { for (TaskIdAttributeContainer attributes : mTaskIdAttributeContainer) { return i; if (attributes.getTask().key.id == taskId) { return attributes; } } } } return -1; return null; } } public TaskThumbnailView getThumbnail() { public TaskThumbnailView getThumbnail() { Loading