When initiating a drag and drop from a folder in home, you could sometimes see
a black background behind the icon. This was due to uncleared drawing caches.
diff --git a/src/com/android/launcher/DragLayer.java b/src/com/android/launcher/DragLayer.java
index 2e59b10..070c938 100644
--- a/src/com/android/launcher/DragLayer.java
+++ b/src/com/android/launcher/DragLayer.java
@@ -53,7 +53,7 @@
     private boolean mShouldDrop;
     private float mLastMotionX;
     private float mLastMotionY;
-    
+
     /**
      * The bitmap that is currently being dragged
      */
@@ -67,42 +67,42 @@
      * X offset from where we touched on the cell to its upper-left corner
      */
     private float mTouchOffsetX;
-    
+
     /**
      * Y offset from where we touched on the cell to its upper-left corner
      */
     private float mTouchOffsetY;
-    
+
     /**
      * Utility rectangle
      */
     private Rect mDragRect = new Rect();
-    
+
     /**
      * Where the drag originated
      */
     private DragSource mDragSource;
-    
+
     /**
      * The data associated with the object being dragged
      */
     private Object mDragInfo;
 
-    private final Rect mRect = new Rect();    
+    private final Rect mRect = new Rect();
     private final int[] mDropCoordinates = new int[2];
 
     private final Vibrator mVibrator = new Vibrator();
-    
+
     private DragListener mListener;
 
     private DragScroller mDragScroller;
-    
+
     private static final int SCROLL_OUTSIDE_ZONE = 0;
     private static final int SCROLL_WAITING_IN_ZONE = 1;
 
     private static final int SCROLL_LEFT = 0;
     private static final int SCROLL_RIGHT = 1;
-    
+
     private int mScrollState = SCROLL_OUTSIDE_ZONE;
 
     private ScrollRunnable mScrollRunnable = new ScrollRunnable();
@@ -201,6 +201,9 @@
         int color = v.getDrawingCacheBackgroundColor();
         v.setDrawingCacheBackgroundColor(0);
 
+        if (color != 0) {
+            v.destroyDrawingCache();
+        }
         v.buildDrawingCache();
         Bitmap viewBitmap = v.getDrawingCache();
         int width = viewBitmap.getWidth();
@@ -582,7 +585,7 @@
     }
 
     public void removeDragListener(DragListener l) {
-        mListener = null;   
+        mListener = null;
     }
 
     /**
@@ -625,5 +628,5 @@
         void setDirection(int direction) {
             mDirection = direction;
         }
-    }    
+    }
 }