From bf885ceb5f81bb01e15cbf61e96d7d0cf0fda1a3 Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Sat, 17 Feb 2024 00:26:48 +0000 Subject: [PATCH] Call showCurrentTask again if applyLoadPlan doesn't include running task Test: swipe up from an app that has excludeFromRecents=true, e.g. Volume Dialog, Home quick settings tile, and Routines widget; ensure the gesture works as expected (e.g. can quick switch, go home, or to overview with all tasks visible). Flag: none Fixes: 324495241 Change-Id: If3b61f7d1725ee573fad38140bfeb77f3a6cea1e --- .../android/quickstep/views/RecentsView.java | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 7bfa5eddd1..ea33b4d195 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -493,9 +493,10 @@ public abstract class RecentsView= 0; i--) { + if (i == stubRunningTaskIndex) { + continue; + } removeView(requireTaskViewAt(i)); } - if (indexOfChild(mClearAllButton) != -1) { + if (getTaskViewCount() == 0 && indexOfChild(mClearAllButton) != -1) { removeView(mClearAllButton); } } @@ -2375,7 +2391,7 @@ public abstract class RecentsView