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

Commit 3a39a25d authored by Samuel Fufa's avatar Samuel Fufa
Browse files

Ignore predicted items when items are drag over them

Bug:145565886
Test:Manual
Change-Id: I727975234d36ef2cba0d58ba1df6886e09157ce6
parent f3b70928
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ public class HotseatPredictionController implements DragController.DragListener,
            }

            WorkspaceItemInfo predictedItem = predictedApps.get(predictionIndex++);
            if (isPredictedIcon(child)) {
            if (isPredictedIcon(child) && child.isEnabled()) {
                PredictedAppIcon icon = (PredictedAppIcon) child;
                icon.applyFromWorkspaceItem(predictedItem);
                icon.finishBinding();
@@ -310,6 +310,7 @@ public class HotseatPredictionController implements DragController.DragListener,
            int rank = ((WorkspaceItemInfo) icon.getTag()).rank;
            outlines.add(new PredictedAppIcon.PredictedIconOutlineDrawing(
                    mHotseat.getCellXFromOrder(rank), mHotseat.getCellYFromOrder(rank), icon));
            icon.setEnabled(false);
            icon.animate().scaleY(0).scaleX(0).setListener(new AnimationSuccessListener() {
                @Override
                public void onAnimationSuccess(Animator animator) {
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
        applyFromWorkspaceItem(info);
        setOnLongClickListener(ItemLongClickListener.INSTANCE_WORKSPACE);
        mIsPinned = true;
        ((CellLayout.LayoutParams) getLayoutParams()).canReorder = true;
        invalidate();
    }

@@ -112,6 +113,7 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
            }
            return true;
        });
        ((CellLayout.LayoutParams) getLayoutParams()).canReorder = false;
        setTextVisibility(false);
        verifyHighRes();
    }
+3 −1
Original line number Diff line number Diff line
@@ -1641,7 +1641,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
            return false;
        }

        boolean aboveShortcut = (dropOverView.getTag() instanceof WorkspaceItemInfo);
        boolean aboveShortcut = (dropOverView.getTag() instanceof WorkspaceItemInfo
                && ((WorkspaceItemInfo) dropOverView.getTag()).container
                != LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION);
        boolean willBecomeShortcut =
                (info.itemType == ITEM_TYPE_APPLICATION ||
                        info.itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT ||