Use just the preview for drag and drop in the standalone activity

Bug: N/A
Test: Manual
Flag: EXEMPT bugfix
Change-Id: I62c42b649e720826979123ae2ff6c5e238fe59dc
This commit is contained in:
Shamali P authored and Shamali Patwa committed 2024-06-07 00:00:31 +00:00
1 parent fc4ff35e68
commit 277a4f9d78
2 files changed
+14 -2

No files matched your search

@@ -194,6 +194,11 @@ public class WidgetPickerActivity extends BaseActivity {
return false;
}
View dragView = widgetCell.getDragAndDropView();
if (dragView == null) {
return false;
}
ClipData clipData = new ClipData(
new ClipDescription(
/* label= */ "", // not displayed anywhere; so, set to empty.
@@ -209,9 +214,9 @@ public class WidgetPickerActivity extends BaseActivity {
.putExtra(EXTRA_IS_PENDING_WIDGET_DRAG, true));
// DRAG_FLAG_GLOBAL permits dragging data beyond app window.
return view.startDragAndDrop(
return dragView.startDragAndDrop(
clipData,
new View.DragShadowBuilder(view),
new View.DragShadowBuilder(dragView),
/* myLocalState= */ null,
View.DRAG_FLAG_GLOBAL
);