From e0fcee01b3e192a6c28c7f6633590edb3225edee Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Thu, 1 Jul 2021 16:34:58 +0100 Subject: [PATCH] Restore previous currentPage in applyLoadPlan in case task is re-ordered Fix: 186537288 Test: Repeatededly launch task from home and swipe to home, animation is correct Test: Quick switch, launch task then swipe up, there is no jump Change-Id: I9fd7416d9811ce4e54a1c6d20374d89d00417cd5 --- .../src/com/android/quickstep/views/RecentsView.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 710a9ab9fe..65ccb138b4 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1087,6 +1087,12 @@ public abstract class RecentsView 0) { setCurrentPage(indexOfChild(getTaskViewAt(0))); } + } else if (currentTaskId != -1) { + currentTaskView = getTaskView(currentTaskId); + if (currentTaskView != null) { + setCurrentPage(indexOfChild(currentTaskView)); + } } if (mIgnoreResetTaskId != -1 && getTaskView(mIgnoreResetTaskId) != ignoreResetTaskView) {