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
This commit is contained in:
Alex Chau 2021-09-07 18:42:39 +01:00
parent ce10de7964
commit a8da6905a9
1 changed files with 1 additions and 1 deletions

View File

@ -1866,7 +1866,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
setCurrentTask(-1);
mIgnoreResetTaskId = -1;
mTaskListChangeId = -1;
mFocusedTaskViewId = getTaskViewCount() > 0 ? getTaskViewAt(0).getTaskViewId() : -1;
mFocusedTaskViewId = -1;
if (mRecentsAnimationController != null) {
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile) {