From c06426164f5eec115d8c3ab651c2346f381cd755 Mon Sep 17 00:00:00 2001 From: Ikram Gabiyev Date: Wed, 16 Nov 2022 05:14:22 +0000 Subject: [PATCH] Stash transient taskbar upon icon drag Transient taskbar needs to be stashed upon dragging the icon from it to create a splitscreen. Bug: 258850827 Test: manually reproduced the steps in the bug Change-Id: I88f2b4b25cb4c12fbe7e646a8ed668921ef24ab9 --- .../android/launcher3/taskbar/TaskbarDragController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index 3045eca052..dfff7eed78 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -305,6 +305,9 @@ public class TaskbarDragController extends DragController im if (mDisallowGlobalDrag) { AbstractFloatingView.closeAllOpenViewsExcept(mActivity, TYPE_TASKBAR_ALL_APPS); } else { + // stash the transient taskbar + mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(true); + AbstractFloatingView.closeAllOpenViews(mActivity); } @@ -413,6 +416,9 @@ public class TaskbarDragController extends DragController im if (dragEvent.getResult()) { maybeOnDragEnd(); } else { + // un-stash the transient taskbar in case drag and drop was canceled + mControllers.taskbarStashController.updateAndAnimateTransientTaskbar(false); + // This will take care of calling maybeOnDragEnd() after the animation animateGlobalDragViewToOriginalPosition(btv, dragEvent); }