Fixing small folder bugs

-> Issue 4972348
-> Center folder when it extends beyond the workspace

Change-Id: Id5551d17d595151bfd27122e1fd4ddfeab7dbf40
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index da859cb..89e4603 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -744,6 +744,12 @@
 
         int left = Math.min(Math.max(0, centeredLeft), parentWidth - width);
         int top = Math.min(Math.max(0, centeredTop), parentHeight - height);
+        if (width >= parentWidth) {
+            left = (parentWidth - width) / 2;
+        }
+        if (height >= parentHeight) {
+            top = (parentHeight - height) / 2;
+        }
 
         int folderPivotX = width / 2 + (centeredLeft - left);
         int folderPivotY = height / 2 + (centeredTop - top);