Disable Drag from Taskbar in Overview

* Still need to disable drag from all apps in overview
* Disallow any taskbar icon long click when in split select

Bug: 251747761
Test: Drag from hotseat and predicted icons in overview,
snaps back to position

Change-Id: Ib9b068e4914b9197614c8e8f49b7899bb964f92b
This commit is contained in:
Vinit Nayak
2022-10-21 11:25:07 -07:00
parent 0c3f990b34
commit 406bc6f247
2 changed files with 135 additions and 49 deletions

View File

@@ -39,6 +39,8 @@ import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.MultiPropertyFactory.MultiProperty;
import com.android.launcher3.uioverrides.states.OverviewState;
import com.android.launcher3.util.MultiValueAlpha;
import com.android.quickstep.AnimatedFloat;
import com.android.quickstep.RecentsAnimationCallbacks;
import com.android.quickstep.RecentsAnimationController;
@@ -117,6 +119,10 @@ import java.util.StringJoiner;
mLauncherState = finalState;
updateStateForFlag(FLAG_TRANSITION_STATE_RUNNING, false);
applyState();
mControllers.taskbarDragController.setDisallowGlobalDrag(
(finalState instanceof OverviewState));
mControllers.taskbarDragController.setDisallowLongClick(
finalState == LauncherState.OVERVIEW_SPLIT_SELECT);
}
};