diff options
4 files changed, 5 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java index ffbbfe8e2b0a..73c0adb6f8d0 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/Task.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/Task.java @@ -176,9 +176,6 @@ public class Task { /** Set the grouping */ public void setGroup(TaskGrouping group) { - if (group != null && this.group != null) { - throw new RuntimeException("This task is already assigned to a group."); - } this.group = group; } diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java index 6e6cef792ae1..c4a71b3aac41 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java @@ -465,9 +465,8 @@ public class TaskStack { if (notifyStackChanges) { mCb.onStackTaskRemoved(this, task, i == (taskCount - 1), null); } - } else { - newTasks.add(task); } + task.setGroup(null); } // Add any new tasks @@ -507,6 +506,8 @@ public class TaskStack { mHistoryTaskList.set(historyTasks); mRawTaskList.clear(); mRawTaskList.addAll(newTasks); + mGroups.clear(); + mAffinitiesGroups.clear(); } /** Gets the front task */ diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java index 5b6fdd1c9cf0..53c02cbbfa51 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -602,6 +602,7 @@ public class RecentsView extends FrameLayout { public final void onBusEvent(TaskStackUpdatedEvent event) { mStack.setTasks(event.stack.computeAllTasksList(), true /* notifyStackChanges */); + mStack.createAffiliatedGroupings(getContext()); } /** diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java index 37d8cd69d10d..8edfae052fcc 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java @@ -129,6 +129,7 @@ public class TaskViewThumbnail extends View { mBitmapShader = null; mDrawPaint.setShader(null); } + invalidate(); } /** Updates the paint to draw the thumbnail. */ |