From 024659c1b070b3d55f6ac4db27aeafe2ff98bad9 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 8 Nov 2018 11:10:20 -0800 Subject: [PATCH] Fixing wrong layout used to calculate drag-n-drop location Bug: 119229781 Bug: 119234125 Change-Id: I24425a7754db3dfef803088761fa67c9586d89d9 --- src/com/android/launcher3/Workspace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 7a8d984d74..96df810323 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1625,7 +1625,7 @@ public class Workspace extends PagedView mDragViewVisualCenter = d.getVisualCenter(mDragViewVisualCenter); // We want the point to be mapped to the dragTarget. - mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter); + mapPointFromDropLayout(dropTargetLayout, mDragViewVisualCenter); int spanX; int spanY; @@ -1827,7 +1827,7 @@ public class Workspace extends PagedView // We want the point to be mapped to the dragTarget. if (dropTargetLayout != null) { - mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter); + mapPointFromDropLayout(dropTargetLayout, mDragViewVisualCenter); } boolean droppedOnOriginalCell = false; @@ -2255,7 +2255,7 @@ public class Workspace extends PagedView // Handle the drag over if (mDragTargetLayout != null) { // We want the point to be mapped to the dragTarget. - mapPointFromDropLayout(mLauncher.getHotseat(), mDragViewVisualCenter); + mapPointFromDropLayout(mDragTargetLayout, mDragViewVisualCenter); int minSpanX = item.spanX; int minSpanY = item.spanY;