am 558f1c2a: Fix NPE in CellLayout (issue 11113502)

* commit '558f1c2ac73c3a0c3c0c316222b6b7f9c76e2501':
  Fix NPE in CellLayout (issue 11113502)
This commit is contained in:
Adam Cohen
2013-10-09 15:24:12 -07:00
committed by Android Git Automerger
+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;