summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-08-30 18:59:30 (GMT)
committerJon Miranda <jonmiranda@google.com>2017-08-30 18:59:30 (GMT)
commit4f59381bc48651c4bb953aa49a2add2b5f6150f2 (patch)
tree89635b1e2efca6ab2a5e41fabfacea8efe60a7d4
parentf8dcb365b4fca06775b417924f9e7f594fa850ec (diff)
downloadandroid_packages_apps_Trebuchet-4f59381bc48651c4bb953aa49a2add2b5f6150f2.zip
android_packages_apps_Trebuchet-4f59381bc48651c4bb953aa49a2add2b5f6150f2.tar.gz
android_packages_apps_Trebuchet-4f59381bc48651c4bb953aa49a2add2b5f6150f2.tar.bz2
Fix bug where dragging app from Search breaks Folder preview.
Bug: 64975940 Change-Id: I3182a9396aa1e34bc3489f794f2de40387c50da3
-rw-r--r--src/com/android/launcher3/folder/FolderIcon.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index 6533b04..8339bc5 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -61,6 +61,7 @@ import com.android.launcher3.Workspace;
import com.android.launcher3.badge.BadgeRenderer;
import com.android.launcher3.badge.FolderBadgeInfo;
import com.android.launcher3.config.FeatureFlags;
+import com.android.launcher3.dragndrop.BaseItemDragListener;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.dragndrop.DragView;
import com.android.launcher3.graphics.IconPalette;
@@ -375,6 +376,9 @@ public class FolderIcon extends FrameLayout implements FolderListener {
if (d.dragInfo instanceof AppInfo) {
// Came from all apps -- make a copy
item = ((AppInfo) d.dragInfo).makeShortcut();
+ } else if (d.dragSource instanceof BaseItemDragListener){
+ // Came from a different window -- make a copy
+ item = new ShortcutInfo((ShortcutInfo) d.dragInfo);
} else {
item = (ShortcutInfo) d.dragInfo;
}