diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index d5f1363..cf4a43b 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2907,7 +2907,7 @@
 
     private void cleanupAddToFolder() {
         if (mDragOverFolderIcon != null) {
-            mDragOverFolderIcon.onDragExit(null);
+            mDragOverFolderIcon.onDragExit();
             mDragOverFolderIcon = null;
         }
     }
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 19956a9..b64d12c 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -50,6 +50,7 @@
 import android.widget.TextView;
 
 import com.android.launcher3.Alarm;
+import com.android.launcher3.AppInfo;
 import com.android.launcher3.CellLayout;
 import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.DragSource;
@@ -163,10 +164,8 @@
     @ViewDebug.ExportedProperty(category = "launcher")
     private boolean mRearrangeOnClose = false;
     boolean mItemsInvalidated = false;
-    private ShortcutInfo mCurrentDragInfo;
     private View mCurrentDragView;
     private boolean mIsExternalDrag;
-    boolean mSuppressOnAdd = false;
     private boolean mDragInProgress = false;
     private boolean mDeleteFolderOnDropCompleted = false;
     private boolean mSuppressFolderDeletion = false;
@@ -291,7 +290,6 @@
                 return false;
             }
 
-            mCurrentDragInfo = item;
             mEmptyCellRank = item.rank;
             mCurrentDragView = v;
 
@@ -322,7 +320,15 @@
         }
 
         mContent.removeItem(mCurrentDragView);
-        mInfo.remove(mCurrentDragInfo, true);
+        if (dragObject.dragInfo instanceof ShortcutInfo) {
+            mItemsInvalidated = true;
+
+            // We do not want to get events for the item being removed, as they will get handled
+            // when the drop completes
+            try (SuppressInfoChanges s = new SuppressInfoChanges()) {
+                mInfo.remove((ShortcutInfo) dragObject.dragInfo, true);
+            }
+        }
         mDragInProgress = true;
         mItemAddedBackToSelfViaIcon = false;
     }
@@ -664,9 +670,8 @@
         mContent.verifyVisibleHighResIcons(mContent.getNextPage());
     }
 
-    public void beginExternalDrag(ShortcutInfo item) {
-        mCurrentDragInfo = item;
-        mEmptyCellRank = mContent.allocateRankForNewItem(item);
+    public void beginExternalDrag() {
+        mEmptyCellRank = mContent.allocateRankForNewItem();
         mIsExternalDrag = true;
         mDragInProgress = true;
 
@@ -845,9 +850,7 @@
     }
 
     private void clearDragInfo() {
-        mCurrentDragInfo = null;
         mCurrentDragView = null;
-        mSuppressOnAdd = false;
         mIsExternalDrag = false;
     }
 
@@ -911,9 +914,9 @@
             mContent.arrangeChildren(views, views.size());
             mItemsInvalidated = true;
 
-            mSuppressOnAdd = true;
-            mFolderIcon.onDrop(d);
-            mSuppressOnAdd = false;
+            try (SuppressInfoChanges s = new SuppressInfoChanges()) {
+                mFolderIcon.onDrop(d);
+            }
         }
 
         if (target != this) {
@@ -930,9 +933,7 @@
         mDeleteFolderOnDropCompleted = false;
         mDragInProgress = false;
         mItemAddedBackToSelfViaIcon = false;
-        mCurrentDragInfo = null;
         mCurrentDragView = null;
-        mSuppressOnAdd = false;
 
         // Reordering may have occured, and we need to save the new item locations. We do this once
         // at the end to prevent unnecessary database operations.
@@ -1274,7 +1275,14 @@
         mContent.completePendingPageChanges();
 
         View currentDragView;
-        ShortcutInfo si = mCurrentDragInfo;
+        final ShortcutInfo si;
+        if (d.dragInfo instanceof AppInfo) {
+            // Came from all apps -- make a copy.
+            si = ((AppInfo) d.dragInfo).makeShortcut();
+        } else {
+            // ShortcutInfo
+            si = (ShortcutInfo) d.dragInfo;
+        }
         if (mIsExternalDrag) {
             currentDragView = mContent.createAndAddViewForRank(si, mEmptyCellRank);
             // Actually move the item in the database if it was an external drag. Call this
@@ -1311,11 +1319,11 @@
         rearrangeChildren();
 
         // Temporarily suppress the listener, as we did all the work already here.
-        mSuppressOnAdd = true;
-        mInfo.add(si, false);
-        mSuppressOnAdd = false;
+        try (SuppressInfoChanges s = new SuppressInfoChanges()) {
+            mInfo.add(si, false);
+        }
+
         // Clear the drag info, as it is no longer being dragged.
-        mCurrentDragInfo = null;
         mDragInProgress = false;
 
         if (mContent.getPageCount() > 1) {
@@ -1338,10 +1346,7 @@
 
     @Override
     public void onAdd(ShortcutInfo item) {
-        // If the item was dropped onto this open folder, we have done the work associated
-        // with adding the item to the folder, as indicated by mSuppressOnAdd being set
-        if (mSuppressOnAdd) return;
-        mContent.createAndAddViewForRank(item, mContent.allocateRankForNewItem(item));
+        mContent.createAndAddViewForRank(item, mContent.allocateRankForNewItem());
         mItemsInvalidated = true;
         LauncherModel.addOrMoveItemInDatabase(
                 mLauncher, item, mInfo.id, 0, item.cellX, item.cellY);
@@ -1349,9 +1354,6 @@
 
     public void onRemove(ShortcutInfo item) {
         mItemsInvalidated = true;
-        // If this item is being dragged from this open folder, we have already handled
-        // the work associated with removing the item, so we don't have to do anything here.
-        if (item == mCurrentDragInfo) return;
         View v = getViewForInfo(item);
         mContent.removeItem(v);
         if (mState == STATE_ANIMATING) {
@@ -1490,4 +1492,20 @@
             }
         }
     };
+
+    /**
+     * Temporary resource held while we don't want to handle info changes
+     */
+    private class SuppressInfoChanges implements AutoCloseable {
+
+        SuppressInfoChanges() {
+            mInfo.removeListener(Folder.this);
+        }
+
+        @Override
+        public void close() {
+            mInfo.addListener(Folder.this);
+            updateTextViewFocus();
+        }
+    }
 }
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index eebbfe8..69c2b0f 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -125,8 +125,6 @@
     Paint mBgPaint = new Paint();
 
     private Alarm mOpenAlarm = new Alarm();
-    @Thunk
-    ItemInfo mDragInfo;
 
     public FolderIcon(Context context, AttributeSet attrs) {
         super(context, attrs);
@@ -195,8 +193,6 @@
         return super.onSaveInstanceState();
     }
 
-
-
     public Folder getFolder() {
         return mFolder;
     }
@@ -242,22 +238,11 @@
             // Workspace#onDropExternal.
             mOpenAlarm.setAlarm(ON_OPEN_DELAY);
         }
-        mDragInfo = dragInfo;
     }
 
     OnAlarmListener mOnOpenListener = new OnAlarmListener() {
         public void onAlarm(Alarm alarm) {
-            ShortcutInfo item;
-            if (mDragInfo instanceof AppInfo) {
-                // Came from all apps -- make a copy.
-                item = ((AppInfo) mDragInfo).makeShortcut();
-                item.spanX = 1;
-                item.spanY = 1;
-            } else {
-                // ShortcutInfo
-                item = (ShortcutInfo) mDragInfo;
-            }
-            mFolder.beginExternalDrag(item);
+            mFolder.beginExternalDrag();
             mLauncher.openFolder(FolderIcon.this);
         }
     };
@@ -284,7 +269,7 @@
         animateFirstItem(animateDrawable, INITIAL_ITEM_ANIMATION_DURATION, false, null);
 
         // This will animate the dragView (srcView) into the new folder
-        onDrop(srcInfo, srcView, dstRect, scaleRelativeToDragLayer, 1, postAnimationRunnable, null);
+        onDrop(srcInfo, srcView, dstRect, scaleRelativeToDragLayer, 1, postAnimationRunnable);
     }
 
     public void performDestroyAnimation(final View finalView, Runnable onCompleteRunnable) {
@@ -298,18 +283,13 @@
                 onCompleteRunnable);
     }
 
-    public void onDragExit(Object dragInfo) {
-        onDragExit();
-    }
-
     public void onDragExit() {
         mBackground.animateToRest();
         mOpenAlarm.cancelAlarm();
     }
 
     private void onDrop(final ShortcutInfo item, DragView animateView, Rect finalRect,
-            float scaleRelativeToDragLayer, int index, Runnable postAnimationRunnable,
-            DragObject d) {
+            float scaleRelativeToDragLayer, int index, Runnable postAnimationRunnable) {
         item.cellX = -1;
         item.cellY = -1;
 
@@ -379,7 +359,7 @@
             item = (ShortcutInfo) d.dragInfo;
         }
         mFolder.notifyDrop();
-        onDrop(item, d.dragView, null, 1.0f, mInfo.contents.size(), d.postAnimationRunnable, d);
+        onDrop(item, d.dragView, null, 1.0f, mInfo.contents.size(), d.postAnimationRunnable);
     }
 
     private void computePreviewDrawingParams(int drawableSize, int totalSize) {
diff --git a/src/com/android/launcher3/folder/FolderPagedView.java b/src/com/android/launcher3/folder/FolderPagedView.java
index 3df1d24..1171d48 100644
--- a/src/com/android/launcher3/folder/FolderPagedView.java
+++ b/src/com/android/launcher3/folder/FolderPagedView.java
@@ -195,7 +195,7 @@
      * Create space for a new item at the end, and returns the rank for that item.
      * Also sets the current page to the last page.
      */
-    public int allocateRankForNewItem(ShortcutInfo info) {
+    public int allocateRankForNewItem() {
         int rank = getItemCount();
         ArrayList<View> views = new ArrayList<>(mFolder.getItemsInReadingOrder());
         views.add(rank, null);
