packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/GridDragDropState.kt
+12
−12
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
It happens when the last item is taller than the dragged item, as we add a Spacer at the end of the list when drag starts and save its initial index. This index becomes invalid (out of bound) after the dragged widget is removed. The fix is to check if the last item is a Spacer item on drag ends and remove it if so. Fixes: 415898439 Test: on device Flag: EXEMPT bugfix Change-Id: I188cf0454df955830b5b830fcc77e5aa7fef87d2