Adding transitions during folder creation

-> Seamless* transition from dropping item onto another
   to the creation of a folder containing those items
-> Seamless* transitions when adding the third item
   to a folder
-> Cleaned up the code in FolderIcon in order to achieve
   above

Change-Id: Iaf2519ac480acfdc928cc2b7585f28bc7d50bd23
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 93fab97..894e395 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1585,19 +1585,20 @@
         startActivityForResult(intent, REQUEST_PICK_WALLPAPER);
     }
 
-    FolderIcon addFolder(int screen, int intersectCellX, int intersectCellY) {
-        FolderInfo folderInfo = new FolderInfo();
+    FolderIcon addFolder(final int screen, int intersectCellX, int intersectCellY) {
+        final FolderInfo folderInfo = new FolderInfo();
         folderInfo.title = getText(R.string.folder_name);
 
         final CellLayout layout = (CellLayout) mWorkspace.getChildAt(screen);
         final int[] cellXY = mTmpAddItemCellCoordinates;
-        if (!layout.findCellForSpanThatIntersects(cellXY, 1, 1, intersectCellX, intersectCellY)) {
+        if (!layout.findCellForSpanThatIntersects(cellXY, 1, 1,
+                intersectCellX, intersectCellY)) {
             showOutOfSpaceMessage();
             return null;
         }
 
         // Update the model
-        LauncherModel.addItemToDatabase(this, folderInfo,
+        LauncherModel.addItemToDatabase(Launcher.this, folderInfo,
                 LauncherSettings.Favorites.CONTAINER_DESKTOP,
                 screen, cellXY[0], cellXY[1], false);
         sFolders.put(folderInfo.id, folderInfo);