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

Bug: 28980830
Change-Id: I725d2ee8994324f09d9ecf7bbbb0090a7ceb5769
This commit is contained in:
Sunny Goyal committed 2016-07-26 14:18:09 -07:00
1 parent 2f88ef34fb
commit 10923b30a2
7 files changed
+104 -63

No files matched your search

+11 -11
View File
@@ -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());