summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/WidgetChooser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/WidgetChooser.java')
-rw-r--r--src/com/android/launcher2/WidgetChooser.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/launcher2/WidgetChooser.java b/src/com/android/launcher2/WidgetChooser.java
index 4718c6c22..101b671df 100644
--- a/src/com/android/launcher2/WidgetChooser.java
+++ b/src/com/android/launcher2/WidgetChooser.java
@@ -34,8 +34,11 @@ public class WidgetChooser extends HomeCustomizationItemGallery implements DragS
int screenX = mMotionDownRawX - (w / 2);
int screenY = mMotionDownRawY - h;
- LauncherAppWidgetInfo dragInfo = new LauncherAppWidgetInfo(-1);
- dragInfo.providerName = info.provider;
+ AppWidgetProviderInfo appWidgetInfo = (AppWidgetProviderInfo)view.getTag();
+ LauncherAppWidgetInfo dragInfo = new LauncherAppWidgetInfo(info.provider);
+ // TODO: Is this really the best place to do this?
+ dragInfo.minWidth = appWidgetInfo.minWidth;
+ dragInfo.minHeight = appWidgetInfo.minHeight;
mDragController.startDrag(bmp, screenX, screenY,
0, 0, w, h, this, dragInfo, DragController.DRAG_ACTION_COPY);
return true;