From 7d633ecb073b0d0fbc5c7d8a1a534ad1beaa76b0 Mon Sep 17 00:00:00 2001 From: Ikram Gabiyev Date: Tue, 22 Nov 2022 06:07:09 +0000 Subject: [PATCH] Remove on drag listener after drag ended Remove the on drag listener for the drag layer in the taskbar after ACTION_DRAG_ENDED is received This is an additional refactoring discussed in ag/20490352 Bug: 258850827 Test: manually reproduced the steps in the bug Change-Id: Ibe207001f41d3ba97a8acaf17d633cbd6682fafd --- .../com/android/launcher3/taskbar/TaskbarDragController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java index a26f5e51e2..d1fea7b069 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java @@ -427,6 +427,8 @@ public class TaskbarDragController extends DragController im // This will take care of calling maybeOnDragEnd() after the animation animateGlobalDragViewToOriginalPosition(btv, dragEvent); } + mActivity.getDragLayer().setOnDragListener(null); + return true; } return false;