Fix NPE in CellLayout (issue 11113502)

Change-Id: I8dafa79f68efdda5402e8b228ea3e81d77549a03
This commit is contained in:
Adam Cohen
2013-10-09 15:15:24 -07:00
parent 564a2e7116
commit 558f1c2ac7
+5 -3
View File
@@ -492,10 +492,12 @@ public class CellLayout extends ViewGroup {
int width, height;
cellToPoint(fra.mCellX, fra.mCellY, mTempLocation);
View child = getChildAt(fra.mCellX, fra.mCellY);
int centerX = mTempLocation[0] + mCellWidth / 2;
int centerY = mTempLocation[1] + previewOffset / 2 +
child.getPaddingTop() + grid.folderBackgroundOffset;
if (child != null) {
int centerX = mTempLocation[0] + mCellWidth / 2;
int centerY = mTempLocation[1] + previewOffset / 2 +
child.getPaddingTop() + grid.folderBackgroundOffset;
// Draw outer ring, if it exists
if (FolderIcon.HAS_OUTER_RING) {
d = FolderRingAnimator.sSharedOuterRingDrawable;