am b46426e3: am cb0468fa: am b79a48c2: Merge "Add logging for NPE (issue 11627249)" into jb-ub-now-jolly-elf

* commit 'b46426e3de3d199429c22fb17d0d798aa78d2886':
  Add logging for NPE (issue 11627249)
This commit is contained in:
Adam Cohen
2014-02-14 20:53:45 +00:00
committed by Android Git Automerger
+7
View File
@@ -2536,6 +2536,13 @@ public class Workspace extends SmoothPagedView
icon.clearPressedOrFocusedBackground();
}
if (child.getTag() == null || !(child.getTag() instanceof ItemInfo)) {
String msg = "Drag started with a view that has no tag set. This "
+ "will cause a crash (issue 11627249) down the line. "
+ "View: " + child + " tag: " + child.getTag();
throw new IllegalStateException(msg);
}
mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
DragController.DRAG_ACTION_MOVE, dragVisualizeOffset, dragRect, scale);