diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index 9b7e320892..1b516bef4d 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -117,6 +117,7 @@ public class TaskbarDragController extends DragController im private int mRegistrationY; private boolean mIsSystemDragInProgress; + private boolean mIsDropHandledByDropTarget; // Animation for the drag shadow back into position after an unsuccessful drag private ValueAnimator mReturnAnimator; @@ -253,7 +254,8 @@ public class TaskbarDragController extends DragController im /* originalView = */ btv, dragLayerX + dragOffset.x, dragLayerY + dragOffset.y, - (View target, DropTarget.DragObject d, boolean success) -> {} /* DragSource */, + (View target, DropTarget.DragObject d, boolean success) -> + mIsDropHandledByDropTarget = success /* DragSource */, btv.getTag() instanceof ItemInfo itemInfo ? itemInfo : null, dragRect, scale * iconScale, @@ -562,7 +564,7 @@ public class TaskbarDragController extends DragController im @Override protected void endDrag() { - if (mDisallowGlobalDrag) { + if (mDisallowGlobalDrag && !mIsDropHandledByDropTarget) { // We need to explicitly set deferDragViewCleanupPostAnimation to true here so the // super call doesn't remove it from the drag layer before the animation completes. // This variable gets set in to false in super.dispatchDropComplete() because it diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java index beda30c3b3..1f5c5419f4 100644 --- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarViewController.java @@ -145,7 +145,7 @@ public class BubbleBarViewController { @Override public void onLauncherItemDroppedOverBubbleBarDragZone(@NonNull BubbleBarLocation location, @NonNull ItemInfo itemInfo) { - //TODO(b/397459664) : fix task bar icon animation after drop + //TODO(b/397459664) : fix drag interruption when there are no bubbles //TODO(b/397459664) : update bubble bar location ShortcutInfo shortcutInfo = null; if (itemInfo instanceof WorkspaceItemInfo) {