From 43798deadb439ef7fb2c3cb9dbdb6599638e9c1a Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Fri, 4 Jan 2019 11:37:22 -0800 Subject: [PATCH] Keep the current page pointing to the running task when applying loadPlan Change-Id: I178f4fb6b75eea9e8d47fa9700798a34117537a6 --- quickstep/src/com/android/quickstep/views/RecentsView.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 6861bc11f9..34b57482ee 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -484,6 +484,11 @@ public abstract class RecentsView extends PagedView impl final TaskView taskView = (TaskView) getChildAt(pageIndex); taskView.bind(task); } + TaskView runningTaskView = getRunningTaskView(); + if (runningTaskView != null) { + setCurrentPage(indexOfChild(runningTaskView)); + } + if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreRestTaskView) { // If the taskView mapping is changing, do not preserve the visuals. Since we are // mostly preserving the first task, and new taskViews are added to the end, it should