diff options
author | Tony <twickham@google.com> | 2016-09-23 18:58:37 -0700 |
---|---|---|
committer | Tony <twickham@google.com> | 2016-09-23 18:58:37 -0700 |
commit | 1cf412ca91315cb60912033c0013706e5cced072 (patch) | |
tree | bc4fba70c25b85bfdd848e8ad4b3d0e3a94ab507 /src/com/android/launcher3/folder | |
parent | 6e74e899d314663415f54895227bb79a51fd734b (diff) | |
download | android_packages_apps_Trebuchet-1cf412ca91315cb60912033c0013706e5cced072.tar.gz android_packages_apps_Trebuchet-1cf412ca91315cb60912033c0013706e5cced072.tar.bz2 android_packages_apps_Trebuchet-1cf412ca91315cb60912033c0013706e5cced072.zip |
Don't attempt to add item back to folder when deferring drag.
Since the item hasn't yet been removed until the deferred drag
starts, adding it again will throw an exception (the view
already has a parent).
Bug: 30769920
Change-Id: Icb95aaa64e6e3c5dc105bbf3e54460b529d02033
Diffstat (limited to 'src/com/android/launcher3/folder')
-rw-r--r-- | src/com/android/launcher3/folder/Folder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java index a666b564d..ebbe64127 100644 --- a/src/com/android/launcher3/folder/Folder.java +++ b/src/com/android/launcher3/folder/Folder.java @@ -916,7 +916,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList if (mDeleteFolderOnDropCompleted && !mItemAddedBackToSelfViaIcon && target != this) { replaceFolderWithFinalItem(); } - } else { + } else if (!mDragController.isDeferringDrag()) { // The drag failed, we need to return the item to the folder ShortcutInfo info = (ShortcutInfo) d.dragInfo; View icon = (mCurrentDragView != null && mCurrentDragView.getTag() == info) |