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

Bug: 38140665
Change-Id: I9386bf70cf51b6be33264f85cbfe9e8049d0c32e
This commit is contained in:
Jon Miranda
2017-05-09 12:43:44 -07:00
parent 38d2add77b
commit aa6f66aad2
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;
@@ -2257,6 +2258,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