diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt index 5e29139e5b..9a2b7ce610 100644 --- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt +++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt @@ -96,10 +96,10 @@ class OverviewCommandHelper( fun canStartHomeSafely(): Boolean = commandQueue.isEmpty() || commandQueue.first().type == HOME - /** Clear pending commands from the queue */ + /** Clear pending or completed commands from the queue */ fun clearPendingCommands() { Log.d(TAG, "clearing pending commands: $commandQueue") - commandQueue.clear() + commandQueue.removeAll { it.status != CommandStatus.PROCESSING } } /** diff --git a/quickstep/src/com/android/quickstep/views/TaskView.kt b/quickstep/src/com/android/quickstep/views/TaskView.kt index 815f8fa422..fc12b73e8b 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.kt +++ b/quickstep/src/com/android/quickstep/views/TaskView.kt @@ -1034,7 +1034,10 @@ constructor( ActiveGestureErrorDetector.GestureEvent.EXPECTING_TASK_APPEARED ) val recentsView = recentsView ?: return null - if (recentsView.runningTaskViewId != -1) { + if ( + recentsView.runningTaskViewId != -1 && + recentsView.mRecentsAnimationController != null + ) { recentsView.onTaskLaunchedInLiveTileMode() // Return a fresh callback in the live tile case, so that it's not accidentally