am 91a9c963: 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.

Merge commit '91a9c9636f10f1e12cd1f660b2e330634fbdc7dc'

* commit '91a9c9636f10f1e12cd1f660b2e330634fbdc7dc':
  When initiating a drag and drop from a folder in home, you could sometimes see
This commit is contained in:
Romain Guy 2009-06-14 21:12:33 -07:00 committed by The Android Open Source Project
commit 726aec16f4
1 changed files with 14 additions and 11 deletions

View File

@ -201,6 +201,9 @@ public class DragLayer extends FrameLayout implements DragController {
int color = v.getDrawingCacheBackgroundColor(); int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0); v.setDrawingCacheBackgroundColor(0);
if (color != 0) {
v.destroyDrawingCache();
}
v.buildDrawingCache(); v.buildDrawingCache();
Bitmap viewBitmap = v.getDrawingCache(); Bitmap viewBitmap = v.getDrawingCache();
int width = viewBitmap.getWidth(); int width = viewBitmap.getWidth();