OSDN Git Service

Merge "Use the icon bounds for all calculations." into jb-ub-now-jolly-elf
authorWinson Chung <winsonc@google.com>
Thu, 14 Nov 2013 19:19:24 +0000 (19:19 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Thu, 14 Nov 2013 19:19:25 +0000 (19:19 +0000)
1  2 
src/com/android/launcher3/Folder.java
src/com/android/launcher3/Workspace.java

Simple merge
@@@ -2544,15 -2536,9 +2544,16 @@@ public class Workspace extends SmoothPa
              icon.clearPressedOrFocusedBackground();
          }
  
-         mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
 +        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);
 +        }
 +
+         DragView dv = mDragController.startDrag(b, dragLayerX, dragLayerY, source, child.getTag(),
                  DragController.DRAG_ACTION_MOVE, dragVisualizeOffset, dragRect, scale);
+         dv.setIntrinsicIconScaleFactor(source.getIntrinsicIconScaleFactor());
  
          if (child.getParent() instanceof ShortcutAndWidgetContainer) {
              mDragSourceInternal = (ShortcutAndWidgetContainer) child.getParent();