summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-08-30 19:20:40 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-08-30 19:20:40 (GMT)
commit8f3285c1c56913031782a414f05df591593ea0ec (patch)
tree5120833c6cd537e801d35bea593c4903a3c75d21
parentbb28c01cf49c013143b7257c9e0a489b24ec4769 (diff)
parent4f59381bc48651c4bb953aa49a2add2b5f6150f2 (diff)
downloadandroid_packages_apps_Trebuchet-8f3285c1c56913031782a414f05df591593ea0ec.zip
android_packages_apps_Trebuchet-8f3285c1c56913031782a414f05df591593ea0ec.tar.gz
android_packages_apps_Trebuchet-8f3285c1c56913031782a414f05df591593ea0ec.tar.bz2
Merge "Fix bug where dragging app from Search breaks Folder preview." into ub-launcher3-dorval-polish2
-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;
}