From 114293fb56a87ac23fa2978f929862eb5803683f Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Fri, 6 Oct 2023 14:42:22 -0700 Subject: [PATCH] Disallow taskbar long click when in split selection state * This is specifically when contextual is initiated on home screen and then user swipes up into overview. * We no longer want to rely on LauncherStates for split specific management Bug: 295981634 Test: Start split on home, swipe up to overview, long press on taskbar app icons, nothing happens Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE Change-Id: I9e56ddbe1f536be779d4848769a993724d5395da --- .../launcher3/taskbar/TaskbarLauncherStateController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java index 88ae34942a..3bfeee8cd7 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java @@ -45,6 +45,7 @@ import com.android.launcher3.QuickstepTransitionManager; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatedFloat; import com.android.launcher3.anim.AnimatorListeners; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.statemanager.StateManager; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.MultiPropertyFactory.MultiProperty; @@ -209,7 +210,10 @@ public class TaskbarLauncherStateController { updateStateForFlag(FLAG_RESUMED, true); } applyState(); - boolean disallowLongClick = finalState == LauncherState.OVERVIEW_SPLIT_SELECT; + boolean disallowLongClick = + FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE.get() + ? mLauncher.isSplitSelectionEnabled() + : finalState == LauncherState.OVERVIEW_SPLIT_SELECT; com.android.launcher3.taskbar.Utilities.setOverviewDragState( mControllers, finalState.disallowTaskbarGlobalDrag(), disallowLongClick, finalState.allowTaskbarInitialSplitSelection());