From f2d44e87561c97511527dd414813ad20c3f05892 Mon Sep 17 00:00:00 2001 From: Thales Lima Date: Fri, 17 Sep 2021 11:42:32 +0100 Subject: [PATCH] launcher: fix animation for quick switch + recents We need to account for the fact that the running task is outside the screen in this case, so we need to add that amount to the grid translation. Bug: 199265499 Test: manual, check the bug Change-Id: I8c6ca28c5486ce9769bd6fa8fbb3d70eb9619dc6 --- .../com/android/quickstep/views/RecentsView.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index e25a8bc5f1..8ec600ded4 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -443,6 +443,7 @@ public abstract class RecentsView 0) { if (mIsRtl) { - TaskView focusedTaskView = showAsGrid() ? getFocusedTaskView() : null; + TaskView focusedTaskView = mShowAsGridLastOnLayout ? getFocusedTaskView() : null; return getScrollForPage(focusedTaskView != null ? indexOfChild(focusedTaskView) : mTaskViewStartIndex); } else {