diff options
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 33472ea56..f5874bfaf 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -472,9 +472,13 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } return true; } - private void endDragging(boolean success) { + private void endDragging(View target, boolean success) { mLauncher.getWorkspace().onDragStopped(success); - mLauncher.exitSpringLoadedDragMode(); + if (!success || target != mLauncher.getWorkspace()) { + // Exit spring loaded mode if we have not successfully dropped or have not handled the + // drop in Workspace + mLauncher.exitSpringLoadedDragMode(); + } mLauncher.unlockScreenOrientation(); } @@ -486,7 +490,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen public void onDragViewVisible() {} @Override public void onDropCompleted(View target, DragObject d, boolean success) { - endDragging(success); + endDragging(target, success); // Display an error message if the drag failed due to there not being enough space on the // target layout we were dropping on. |