Fix bug where deep shortcut drag view target was skewed to the right.

am: aa6f66aad2

Change-Id: I87a99bfc52d7c8398099fc2230f02c0c7b6dee22
This commit is contained in:
Jon Miranda
2017-05-09 20:35:17 +00:00
committed by android-build-merger
2 changed files with 4 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.DragPreviewProvider;
import com.android.launcher3.graphics.PreloadIconDrawable;
import com.android.launcher3.popup.PopupContainerWithArrow;
import com.android.launcher3.shortcuts.ShortcutDragPreviewProvider;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ItemInfoMatcher;
@@ -2262,6 +2263,8 @@ public class Workspace extends PagedView
int previewSize = grid.folderIconSizePx;
dragVisualizeOffset = new Point(- halfPadding, halfPadding - child.getPaddingTop());
dragRect = new Rect(0, child.getPaddingTop(), child.getWidth(), previewSize);
} else if (previewProvider instanceof ShortcutDragPreviewProvider) {
dragVisualizeOffset = new Point(- halfPadding, halfPadding);
}
// Clear the pressed state if necessary