Merge "Adding persistence of saved wallpaper images" into jb-ub-now-indigo-rose
diff --git a/proguard.flags b/proguard.flags
index 7397088..806105f 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -14,12 +14,6 @@
 -keep class com.android.launcher3.CellLayout {
   public float getBackgroundAlpha();
   public void setBackgroundAlpha(float);
-  public float getDimmableProgress();
-  public void setDimmableProgress(float);
-  public float getHoverScale();
-  public void setHoverScale(float);
-  public float getHoverAlpha();
-  public void setHoverAlpha(float);
 }
 
 -keep class com.android.launcher3.DragLayer$LayoutParams {
@@ -49,18 +43,6 @@
   public void setBackgroundAlpha(float);
   public float getChildrenOutlineAlpha();
   public void setChildrenOutlineAlpha(float);
-  public void setVerticalWallpaperOffset(float);
-  public float getVerticalWallpaperOffset();
-  public void setHorizontalWallpaperOffset(float);
-  public float getHorizontalWallpaperOffset();
-}
-
--keep class com.android.launcher3.AllApps3D$Defines {
-  *;
-}
-
--keep class com.android.launcher3.ClippedImageView {
-  *;
 }
 
 -keep class com.android.launcher3.MemoryDumpActivity {
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 0a0452d..682c2ed 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -947,9 +947,11 @@
         int heightSpecMode = MeasureSpec.getMode(heightMeasureSpec);
         int widthSize = MeasureSpec.getSize(widthMeasureSpec);
         int heightSize =  MeasureSpec.getSize(heightMeasureSpec);
-        if (mCellWidth < 0 || mCellHeight < 0) {
-            mCellWidth = grid.calculateCellWidth(widthSize, mCountX);
-            mCellHeight = grid.calculateCellHeight(heightSize, mCountY);
+        int cw = grid.calculateCellWidth(widthSize, mCountX);
+        int ch = grid.calculateCellHeight(heightSize, mCountY);
+        if (cw != mCellWidth || ch != mCellHeight) {
+            mCellWidth = cw;
+            mCellHeight = ch;
             mShortcutsAndWidgets.setCellDimensions(mCellWidth, mCellHeight, mWidthGap,
                     mHeightGap, mCountX, mCountY);
         }
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index 05d6dc4..dce18fe 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -145,6 +145,13 @@
                     item.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) {
                 return true;
             }
+
+            if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
+                    (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_FOLDER ||
+                    item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION)) {
+                return true;
+            }
+
             if (item.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION &&
                 item instanceof ShortcutInfo) {
                 if (AppsCustomizePagedView.DISABLE_ALL_APPS) {