Merge "fix render glitch for "digest" animation when items are added to a new screen" into honeycomb
diff --git a/res/drawable-xlarge-mdpi/homescreen_large_blue_strong.9.png b/res/drawable-xlarge-mdpi/homescreen_large_blue_strong.9.png
deleted file mode 100644
index f4913e5..0000000
--- a/res/drawable-xlarge-mdpi/homescreen_large_blue_strong.9.png
+++ /dev/null
Binary files differ
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 0d774c9..c105c36 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -84,7 +84,6 @@
     private float mBackgroundAlphaMultiplier = 1.0f;
 
     private Drawable mNormalBackground;
-    private Drawable mNormalGlowBackground;
     private Drawable mActiveBackground;
     private Drawable mActiveGlowBackground;
     private Drawable mNormalBackgroundMini;
@@ -169,7 +168,6 @@
 
         if (LauncherApplication.isScreenXLarge()) {
             mNormalBackground = res.getDrawable(R.drawable.homescreen_large_blue);
-            mNormalGlowBackground = res.getDrawable(R.drawable.homescreen_large_blue_strong);
             mActiveBackground = res.getDrawable(R.drawable.homescreen_large_green);
             mActiveGlowBackground = res.getDrawable(R.drawable.homescreen_large_green_strong);
 
@@ -179,7 +177,6 @@
             mActiveGlowBackgroundMini = res.getDrawable(R.drawable.homescreen_small_green_strong);
 
             mNormalBackground.setFilterBitmap(true);
-            mNormalGlowBackground.setFilterBitmap(true);
             mActiveBackground.setFilterBitmap(true);
             mActiveGlowBackground.setFilterBitmap(true);
             mNormalBackgroundMini.setFilterBitmap(true);
@@ -383,8 +380,8 @@
                 bg = mini ? mActiveBackgroundMini : mActiveGlowBackground;
             } else if (mIsDragOccuring && mAcceptsDrops) {
                 bg = mini ? mActiveBackgroundMini : mActiveBackground;
-            } else if (mIsDragOccuring && mIsDefaultDropTarget) {
-                bg = mini ? mNormalGlowBackgroundMini : mNormalGlowBackground;
+            } else if (mIsDefaultDropTarget && mini) {
+                bg = mNormalGlowBackgroundMini;
             } else {
                 bg = mini ? mNormalBackgroundMini : mNormalBackground;
             }
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index dabc42a..1a7067e 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1148,10 +1148,7 @@
         final int[] cellXY = mTmpAddItemCellCoordinates;
         final CellLayout layout = (CellLayout) mWorkspace.getChildAt(screen);
 
-        int[] touchXY = null;
-        if (mAddDropPosition != null && mAddDropPosition[0] > -1 && mAddDropPosition[1] > -1) {
-            touchXY = mAddDropPosition;
-        }
+        int[] touchXY = mAddDropPosition;
         boolean foundCellSpan = false;
         if (touchXY != null) {
             // when dragging and dropping, just find the closest free spot
@@ -1196,13 +1193,7 @@
         // if we are placing widgets on a "spring-loaded" screen
         final int[] cellXY = mTmpAddItemCellCoordinates;
 
-        // For now, we don't save the coordinate where we dropped the icon because we're not
-        // supporting spring-loaded mini-screens; however, leaving the ability to directly place
-        // a widget on the home screen in case we want to add it in the future
-        int[] touchXY = null;
-        if (mAddDropPosition != null && mAddDropPosition[0] > -1 && mAddDropPosition[1] > -1) {
-            touchXY = mAddDropPosition;
-        }
+        int[] touchXY = mAddDropPosition;
         boolean foundCellSpan = false;
         if (touchXY != null) {
             // when dragging and dropping, just find the closest free spot