mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Merge "Mask bitmap creation errors while dragging shortcuts." into froyo
This commit is contained in:
committed by
Android (Google) Code Review
commit
3e297b57a0
@@ -163,6 +163,11 @@ public class DragController {
|
||||
|
||||
Bitmap b = getViewBitmap(v);
|
||||
|
||||
if (b == null) {
|
||||
// out of memory?
|
||||
return;
|
||||
}
|
||||
|
||||
int[] loc = mCoordinatesTemp;
|
||||
v.getLocationOnScreen(loc);
|
||||
int screenX = loc[0];
|
||||
@@ -249,6 +254,10 @@ public class DragController {
|
||||
}
|
||||
v.buildDrawingCache();
|
||||
Bitmap cacheBitmap = v.getDrawingCache();
|
||||
if (cacheBitmap == null) {
|
||||
Log.e(TAG, "failed getViewBitmap(" + v + ")", new RuntimeException());
|
||||
return null;
|
||||
}
|
||||
|
||||
Bitmap bitmap = Bitmap.createBitmap(cacheBitmap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user