Prevent dropping a drag from TaskbarAllApps in Overview

* Don't close TaskbarAllApps once drag starts
(see comment in code regarding needing multiple shared drag
layers)
* Hide app menu split options for taskbar in overview
* One TODO is that the animation needs to be tweaked
because the scale of the icon when it's returned is too large.
* I think maybe we have to change the
TaskbarDragController#mDragIconSize since that gets directly
set from a resource. Unclear.

Test: Dragged in TaskbarAllApps in overivew and in split
select, app returned to original position and not taskbar
Bug: 251747761

Change-Id: I785f34b0bdb0b0abfc440450494074f8dfe7c31a
This commit is contained in:
Vinit Nayak
2022-10-30 16:50:32 -07:00
parent b63cc3f113
commit eae4c99434
4 changed files with 47 additions and 7 deletions

View File

@@ -119,10 +119,13 @@ 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);
boolean disallowGlobalDrag = finalState instanceof OverviewState;
boolean disallowLongClick = finalState == LauncherState.OVERVIEW_SPLIT_SELECT;
mControllers.taskbarDragController.setDisallowGlobalDrag(disallowGlobalDrag);
mControllers.taskbarDragController.setDisallowLongClick(disallowLongClick);
mControllers.taskbarAllAppsController.setDisallowGlobalDrag(disallowGlobalDrag);
mControllers.taskbarAllAppsController.setDisallowLongClick(disallowLongClick);
mControllers.taskbarPopupController.setHideSplitOptions(disallowGlobalDrag);
}
};