Merge "Fixing potential crash when trying to create 0x0 bitmaps"

This commit is contained in:
Michael Jurka 2012-03-26 10:59:13 -07:00 committed by Android (Google) Code Review
commit 031d3d8838
1 changed files with 2 additions and 0 deletions

View File

@ -1107,6 +1107,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
bitmapWidth = drawable.getIntrinsicWidth();
bitmapHeight = drawable.getIntrinsicHeight();
} else {
if (cellHSpan < 1) cellHSpan = 1;
if (cellVSpan < 1) cellVSpan = 1;
// Determine the size of the bitmap for the preview image we will generate
// TODO: This actually uses the apps customize cell layout params, where as we make want
// the Workspace params for more accuracy.