From 8bb25c54a199d57b057c0ee27250473eaf3a6351 Mon Sep 17 00:00:00 2001 From: Pat Manning Date: Wed, 16 Apr 2025 18:33:00 +0100 Subject: [PATCH] Block dismiss while recents is scrolling. Fix: 407903672 Test: Manual. Flag: com.android.launcher3.enable_expressive_dismiss_task_motion Change-Id: I91136537cfe5ae07387e90e794e18db3240e9897 --- .../touchcontrollers/TaskViewDismissTouchController.kt | 6 ++++++ .../touchcontrollers/TaskViewLaunchTouchController.kt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt index 37015dbb34..914925fd03 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewDismissTouchController.kt @@ -92,6 +92,12 @@ CONTAINER : RecentsViewContainer { false } + // Do not allow dismiss while recents is scrolling. + !recentsView.scroller.isFinished -> { + debugLog(TAG, "Not intercepting touch, recents scrolling.") + false + } + else -> taskViewRecentsTouchContext.isRecentsInteractive.also { isRecentsInteractive -> if (!isRecentsInteractive) { diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt index d4c6c8b18c..6225c47835 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TaskViewLaunchTouchController.kt @@ -93,6 +93,12 @@ CONTAINER : RecentsViewContainer { false } + // Do not allow launch while recents is scrolling. + !recentsView.scroller.isFinished -> { + debugLog(TAG, "Not intercepting touch, recents scrolling.") + false + } + else -> taskViewRecentsTouchContext.isRecentsInteractive.also { isRecentsInteractive -> if (!isRecentsInteractive) {