summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Workspace.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-07-26 22:15:09 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-07-26 22:15:09 +0000
commit984c260a98115ba11df4dfada3cbbd3dea44eb00 (patch)
tree2d289f0bf4535d4b9936849947c03a02b515cbe5 /src/com/android/launcher3/Workspace.java
parent8c06310b068291facb3e6e1224f48d866f0c0040 (diff)
parent10923b30a22b4ec8d10cf8536bddf3f176e6c26f (diff)
downloadandroid_packages_apps_Trebuchet-984c260a98115ba11df4dfada3cbbd3dea44eb00.tar.gz
android_packages_apps_Trebuchet-984c260a98115ba11df4dfada3cbbd3dea44eb00.tar.bz2
android_packages_apps_Trebuchet-984c260a98115ba11df4dfada3cbbd3dea44eb00.zip
Merge "Removing shadow and badging from the icon which is shown in the menu These are added as soon as the icon is added to the workspace" into ub-launcher3-calgary
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r--src/com/android/launcher3/Workspace.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 946c306d6..4ed2467eb 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2301,11 +2301,19 @@ public class Workspace extends PagedView
}
public void beginDragShared(View child, DragSource source, boolean accessible) {
- beginDragShared(child, new Point(), source, accessible, new DragPreviewProvider(child));
+ Object dragObject = child.getTag();
+ if (!(dragObject 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);
+ }
+ beginDragShared(child, new Point(), source, accessible,
+ (ItemInfo) dragObject, new DragPreviewProvider(child));
}
public void beginDragShared(View child, Point relativeTouchPos, DragSource source,
- boolean accessible, DragPreviewProvider previewProvider) {
+ boolean accessible, ItemInfo dragObject, DragPreviewProvider previewProvider) {
child.clearFocus();
child.setPressed(false);
@@ -2362,20 +2370,12 @@ public class Workspace extends PagedView
icon.clearPressedBackground();
}
- Object dragObject = child.getTag();
- if (!(dragObject 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);
- }
-
if (child.getParent() instanceof ShortcutAndWidgetContainer) {
mDragSourceInternal = (ShortcutAndWidgetContainer) child.getParent();
}
DragView dv = mDragController.startDrag(b, dragLayerX, dragLayerY, source,
- (ItemInfo) dragObject, DragController.DRAG_ACTION_MOVE, dragVisualizeOffset,
+ dragObject, DragController.DRAG_ACTION_MOVE, dragVisualizeOffset,
dragRect, scale, accessible);
dv.setIntrinsicIconScaleFactor(source.getIntrinsicIconScaleFactor());