Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements mDummyStackView.updateLayoutForStack(stack); final Task toTask = new Task(); final TaskViewTransform toTransform = getThumbnailTransitionTransform(stack, stackView, topTask.id, toTask); toTask); ForegroundThread.getHandler().postAtFrontOfQueue(new Runnable() { @Override public void run() { Loading Loading @@ -721,7 +721,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements // Update the destination rect Task toTask = new Task(); TaskViewTransform toTransform = getThumbnailTransitionTransform(stack, stackView, topTask.id, toTask); toTask); RectF toTaskRect = toTransform.rect; Bitmap thumbnail = getThumbnailBitmap(topTask, toTask, toTransform); if (thumbnail != null) { Loading Loading @@ -754,14 +754,14 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements * Returns the transition rect for the given task id. */ private TaskViewTransform getThumbnailTransitionTransform(TaskStack stack, TaskStackView stackView, int runningTaskId, Task runningTaskOut) { TaskStackView stackView, Task runningTaskOut) { // Find the running task in the TaskStack Task launchTask = stack.getLaunchTarget(); if (launchTask != null) { runningTaskOut.copyFrom(launchTask); } else { // If no task is specified or we can not find the task just use the front most one launchTask = stack.getStackFrontMostTask(); launchTask = stack.getStackFrontMostTask(true /* includeFreeform */); runningTaskOut.copyFrom(launchTask); } Loading packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java +4 −4 Original line number Diff line number Diff line Loading @@ -527,9 +527,9 @@ public class TaskStack { */ public void removeTask(Task t, TaskViewAnimation animation) { if (mStackTaskList.contains(t)) { boolean wasFrontMostTask = (getStackFrontMostTask() == t); boolean wasFrontMostTask = (getStackFrontMostTask(false /* includeFreeform */) == t); removeTaskImpl(mStackTaskList, t); Task newFrontMostTask = getStackFrontMostTask(); Task newFrontMostTask = getStackFrontMostTask(false /* includeFreeform */); if (mCb != null) { // Notify that a task has been removed mCb.onStackTaskRemoved(this, t, wasFrontMostTask, newFrontMostTask, animation); Loading Loading @@ -616,14 +616,14 @@ public class TaskStack { /** * Gets the front-most task in the stack. */ public Task getStackFrontMostTask() { public Task getStackFrontMostTask(boolean includeFreeformTasks) { ArrayList<Task> stackTasks = mStackTaskList.getTasks(); if (stackTasks.isEmpty()) { return null; } for (int i = stackTasks.size() - 1; i >= 0; i--) { Task task = stackTasks.get(i); if (!task.isFreeformTask()) { if (!task.isFreeformTask() || includeFreeformTasks) { return task; } } Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +2 −1 Original line number Diff line number Diff line Loading @@ -1427,7 +1427,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal } // Restore the action button visibility if it is the front most task view if (mScreenPinningEnabled && tv.getTask() == mStack.getStackFrontMostTask()) { if (mScreenPinningEnabled && tv.getTask() == mStack.getStackFrontMostTask(false /* includeFreeform */)) { tv.showActionButton(false /* fadeIn */, 0 /* fadeInDuration */); } } Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -651,7 +651,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements mDummyStackView.updateLayoutForStack(stack); final Task toTask = new Task(); final TaskViewTransform toTransform = getThumbnailTransitionTransform(stack, stackView, topTask.id, toTask); toTask); ForegroundThread.getHandler().postAtFrontOfQueue(new Runnable() { @Override public void run() { Loading Loading @@ -721,7 +721,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements // Update the destination rect Task toTask = new Task(); TaskViewTransform toTransform = getThumbnailTransitionTransform(stack, stackView, topTask.id, toTask); toTask); RectF toTaskRect = toTransform.rect; Bitmap thumbnail = getThumbnailBitmap(topTask, toTask, toTransform); if (thumbnail != null) { Loading Loading @@ -754,14 +754,14 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements * Returns the transition rect for the given task id. */ private TaskViewTransform getThumbnailTransitionTransform(TaskStack stack, TaskStackView stackView, int runningTaskId, Task runningTaskOut) { TaskStackView stackView, Task runningTaskOut) { // Find the running task in the TaskStack Task launchTask = stack.getLaunchTarget(); if (launchTask != null) { runningTaskOut.copyFrom(launchTask); } else { // If no task is specified or we can not find the task just use the front most one launchTask = stack.getStackFrontMostTask(); launchTask = stack.getStackFrontMostTask(true /* includeFreeform */); runningTaskOut.copyFrom(launchTask); } Loading
packages/SystemUI/src/com/android/systemui/recents/model/TaskStack.java +4 −4 Original line number Diff line number Diff line Loading @@ -527,9 +527,9 @@ public class TaskStack { */ public void removeTask(Task t, TaskViewAnimation animation) { if (mStackTaskList.contains(t)) { boolean wasFrontMostTask = (getStackFrontMostTask() == t); boolean wasFrontMostTask = (getStackFrontMostTask(false /* includeFreeform */) == t); removeTaskImpl(mStackTaskList, t); Task newFrontMostTask = getStackFrontMostTask(); Task newFrontMostTask = getStackFrontMostTask(false /* includeFreeform */); if (mCb != null) { // Notify that a task has been removed mCb.onStackTaskRemoved(this, t, wasFrontMostTask, newFrontMostTask, animation); Loading Loading @@ -616,14 +616,14 @@ public class TaskStack { /** * Gets the front-most task in the stack. */ public Task getStackFrontMostTask() { public Task getStackFrontMostTask(boolean includeFreeformTasks) { ArrayList<Task> stackTasks = mStackTaskList.getTasks(); if (stackTasks.isEmpty()) { return null; } for (int i = stackTasks.size() - 1; i >= 0; i--) { Task task = stackTasks.get(i); if (!task.isFreeformTask()) { if (!task.isFreeformTask() || includeFreeformTasks) { return task; } } Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +2 −1 Original line number Diff line number Diff line Loading @@ -1427,7 +1427,8 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal } // Restore the action button visibility if it is the front most task view if (mScreenPinningEnabled && tv.getTask() == mStack.getStackFrontMostTask()) { if (mScreenPinningEnabled && tv.getTask() == mStack.getStackFrontMostTask(false /* includeFreeform */)) { tv.showActionButton(false /* fadeIn */, 0 /* fadeInDuration */); } } Loading