Factor in CellLayout padding in cell size calculation. am: 8632d9dd1e am: d39707b662

Change-Id: Iaf4e9135190c15f053279175ddf9522794a325af
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index ca5d8e7..2d5f8d0 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -436,7 +436,8 @@
         // Since we are only concerned with the overall padding, layout direction does
         // not matter.
         Point padding = getTotalWorkspacePadding();
-        result.x = calculateCellWidth(availableWidthPx - padding.x, inv.numColumns);
+        int cellPadding = cellLayoutPaddingLeftRightPx * 2;
+        result.x = calculateCellWidth(availableWidthPx - padding.x - cellPadding, inv.numColumns);
         result.y = calculateCellHeight(availableHeightPx - padding.y, inv.numRows);
         return result;
     }