summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-24 17:01:51 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-10-24 17:01:51 +0000
commit0c6f881e25f47e93d9617341ba6cbd855c3e111f (patch)
tree604c2149d8fe181520f726343ecf45a5e58ae306
parent375073f535a690570a8e1d27375ff452f918f7a0 (diff)
parentff1ea8f8f6f89c9ee577bf311c4feb3a16bcb2e0 (diff)
Merge "Update drag-drop collision detection" into main
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
index 5feb63df0bca..1551ca97a2e3 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
@@ -182,7 +182,8 @@ internal constructor(
val itemBoundingBox = IntRect(item.offset, item.size)
draggingItemKey != item.key &&
contentListState.isItemEditable(item.index) &&
- draggingBoundingBox.contains(itemBoundingBox.center)
+ (draggingBoundingBox.contains(itemBoundingBox.center) ||
+ itemBoundingBox.contains(draggingBoundingBox.center))
}
} else {
state.layoutInfo.visibleItemsInfo