From a8da6905a919a7cb61c965d83b8e9504ef04805d Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Tue, 7 Sep 2021 18:42:39 +0100 Subject: [PATCH] Always reset focusedTask to -1 on reset - Keep old focused task causes old focused task to be restored after applyLoadPlan: http://cs/android/packages/apps/Launcher3/quickstep/src/com/android/quickstep/views/RecentsView.java?l=1365 - This caused the nth task to be focused rather than the first task - The fix is to reset focusedTask in reset when exiting overview, focused task will be set properly next time through applyLoadPlan when overview is relaunched Fix: 199150523 Fix: 198420226 Test: TaplTestsNexus.testOverviewActions Test: Quick switch > launch app > swipe home > swipe up to overview > snap to focused task Test: split screen > swipe home > swipe up to overview > snap to focused task Change-Id: I06399626ed3ee033345bd67296d79d59a98a507f --- quickstep/src/com/android/quickstep/views/RecentsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 3b962d8bec..b690982efb 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1866,7 +1866,7 @@ public abstract class RecentsView 0 ? getTaskViewAt(0).getTaskViewId() : -1; + mFocusedTaskViewId = -1; if (mRecentsAnimationController != null) { if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile) {