mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Accessibility fixes for moving items
am: 0270039b98
Change-Id: I856b8980817dd36785f27e203c0ee6174b24e568
This commit is contained in:
@@ -2277,7 +2277,7 @@ public class Workspace extends PagedView
|
||||
mDragSourceInternal = (ShortcutAndWidgetContainer) child.getParent();
|
||||
}
|
||||
|
||||
if (child instanceof BubbleTextView) {
|
||||
if (child instanceof BubbleTextView && !dragOptions.isAccessibleDrag) {
|
||||
PopupContainerWithArrow popupContainer = PopupContainerWithArrow
|
||||
.showForIcon((BubbleTextView) child);
|
||||
if (popupContainer != null) {
|
||||
@@ -2529,6 +2529,8 @@ public class Workspace extends PagedView
|
||||
}
|
||||
}
|
||||
|
||||
boolean droppedOnOriginalCell = false;
|
||||
|
||||
int snapScreen = -1;
|
||||
boolean resizeOnDrop = false;
|
||||
if (d.dragSource != this) {
|
||||
@@ -2580,9 +2582,9 @@ public class Workspace extends PagedView
|
||||
minSpanY = item.minSpanY;
|
||||
}
|
||||
|
||||
droppedOnOriginalCellDuringTransition = mIsSwitchingState
|
||||
&& item.screenId == screenId && item.container == container
|
||||
droppedOnOriginalCell = item.screenId == screenId && item.container == container
|
||||
&& item.cellX == mTargetCell[0] && item.cellY == mTargetCell[1];
|
||||
droppedOnOriginalCellDuringTransition = droppedOnOriginalCell && mIsSwitchingState;
|
||||
|
||||
// When quickly moving an item, a user may accidentally rearrange their
|
||||
// workspace. So instead we move the icon back safely to its original position.
|
||||
@@ -2717,7 +2719,7 @@ public class Workspace extends PagedView
|
||||
}
|
||||
parent.onDropChild(cell);
|
||||
}
|
||||
if (d.stateAnnouncer != null) {
|
||||
if (d.stateAnnouncer != null && !droppedOnOriginalCell) {
|
||||
d.stateAnnouncer.completeAction(R.string.item_moved);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user