Fixed 3066306 Widget measurement wrong in customize tray
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index b7e5dcd..f3de74b 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -624,8 +624,10 @@
             l.setOnLongClickListener(this);
 
             final Drawable icon = getWidgetIcon(info);
-            final int hSpan = mWorkspaceWidgetLayout.estimateCellHSpan(info.minWidth);
-            final int vSpan = mWorkspaceWidgetLayout.estimateCellHSpan(info.minHeight);
+
+            int[] spans = CellLayout.rectToCell(getResources(), info.minWidth, info.minHeight, null);
+            final int hSpan = spans[0];
+            final int vSpan = spans[1];
 
             ImageView image = (ImageView) l.findViewById(R.id.widget_preview);
             image.setMaxWidth(mMaxWidgetWidth);