diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index c4086b2..613b430 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -521,13 +521,17 @@
 
         mDragObject.dragComplete = true;
         if (mIsInPreDrag) {
-            mDragObject.cancelled = true;
+            if (dropTarget != null) {
+                dropTarget.onDragExit(mDragObject);
+            }
+            return;
         }
+
         // Drop onto the target.
         boolean accepted = false;
         if (dropTarget != null) {
             dropTarget.onDragExit(mDragObject);
-            if (!mIsInPreDrag && dropTarget.acceptDrop(mDragObject)) {
+            if (dropTarget.acceptDrop(mDragObject)) {
                 if (flingAnimation != null) {
                     flingAnimation.run();
                 } else {
diff --git a/src/com/android/launcher3/dragndrop/LauncherDragController.java b/src/com/android/launcher3/dragndrop/LauncherDragController.java
index e3b8965..4aa3673 100644
--- a/src/com/android/launcher3/dragndrop/LauncherDragController.java
+++ b/src/com/android/launcher3/dragndrop/LauncherDragController.java
@@ -15,8 +15,6 @@
  */
 package com.android.launcher3.dragndrop;
 
-import static android.view.View.VISIBLE;
-
 import static com.android.launcher3.AbstractFloatingView.TYPE_DISCOVERY_BOUNCE;
 import static com.android.launcher3.LauncherAnimUtils.SPRING_LOADED_EXIT_DELAY;
 import static com.android.launcher3.LauncherState.EDIT_MODE;
@@ -27,7 +25,6 @@
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.view.HapticFeedbackConstants;
-import android.view.MotionEvent;
 import android.view.View;
 
 import androidx.annotation.Nullable;
@@ -36,13 +33,10 @@
 import com.android.launcher3.AbstractFloatingView;
 import com.android.launcher3.DragSource;
 import com.android.launcher3.DropTarget;
-import com.android.launcher3.DropTarget.DragObject;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.R;
 import com.android.launcher3.accessibility.DragViewStateAnnouncer;
-import com.android.launcher3.dragndrop.DragOptions.PreDragCondition;
 import com.android.launcher3.model.data.ItemInfo;
-import com.android.launcher3.util.TouchUtil;
 import com.android.launcher3.widget.util.WidgetDragScaleUtils;
 
 /**
@@ -53,9 +47,6 @@
     private static final boolean PROFILE_DRAWING_DURING_DRAG = false;
     private final FlingToDeleteHelper mFlingToDeleteHelper;
 
-    /** Whether or not the drag operation is triggered by mouse right click. */
-    private boolean mIsInMouseRightClick = false;
-
     public LauncherDragController(Launcher launcher) {
         super(launcher);
         mFlingToDeleteHelper = new FlingToDeleteHelper(launcher);
@@ -78,27 +69,6 @@
             android.os.Debug.startMethodTracing("Launcher");
         }
 
-        if (mIsInMouseRightClick && options.preDragCondition == null
-                && originalView instanceof View v) {
-            options.preDragCondition = new PreDragCondition() {
-
-                @Override
-                public boolean shouldStartDrag(double distanceDragged) {
-                    return false;
-                }
-
-                @Override
-                public void onPreDragStart(DragObject dragObject) {
-                    // Set it to visible so the text of FolderIcon would not flash (avoid it from
-                    // being invisible and then visible)
-                    v.setVisibility(VISIBLE);
-                }
-
-                @Override
-                public void onPreDragEnd(DragObject dragObject, boolean dragStarted) { }
-            };
-        }
-
         mActivity.hideKeyboard();
         AbstractFloatingView.closeOpenViews(mActivity, false, TYPE_DISCOVERY_BOUNCE);
 
@@ -221,7 +191,7 @@
 
     @Override
     protected void exitDrag() {
-        if (!mIsInPreDrag && !mActivity.isInState(EDIT_MODE)) {
+        if (!mActivity.isInState(EDIT_MODE)) {
             mActivity.getStateManager().goToState(NORMAL, SPRING_LOADED_EXIT_DELAY);
         }
     }
@@ -248,13 +218,4 @@
                 dropCoordinates);
         return mActivity.getWorkspace();
     }
-
-    /**
-     * Intercepts touch events from a drag source view.
-     */
-    @Override
-    public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
-        mIsInMouseRightClick = TouchUtil.isMouseRightClickDownOrMove(ev);
-        return super.onControllerInterceptTouchEvent(ev);
-    }
 }
