Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb6a1542 authored by Andras Kloczl's avatar Andras Kloczl
Browse files

Fix widget jump bug when moved to invalid place

When dropTargetLayout is null we don't need to
animate the widget to the closest location but
move it back to its original position.
Test: manual
Bug: 236135424

Change-Id: I50a793732cd9656605fdc9908f71ff0efa7e69e9
parent c92b40f1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2122,7 +2122,8 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
                final ItemInfo info = (ItemInfo) cell.getTag();
                boolean isWidget = info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET
                        || info.itemType == LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET;
                if (isWidget) {
                if (isWidget && dropTargetLayout != null) {
                    // animate widget to a valid place
                    int animationType = resizeOnDrop ? ANIMATE_INTO_POSITION_AND_RESIZE :
                            ANIMATE_INTO_POSITION_AND_DISAPPEAR;
                    animateWidgetDrop(info, parent, d.dragView, null, animationType, cell, false);