Merge "WidgetTray UI - change text color for the section and widget name" into ub-launcher3-burnaby
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index e0aecea..ed8eea7 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -704,9 +704,15 @@
         if (mInfo.opened) {
             mLauncher.closeFolder();
             mRearrangeOnClose = true;
+        } else if (mState == STATE_ANIMATING) {
+            mRearrangeOnClose = true;
         } else {
             rearrangeChildren();
+            clearDragInfo();
         }
+    }
+
+    private void clearDragInfo() {
         mCurrentDragInfo = null;
         mCurrentDragView = null;
         mSuppressOnAdd = false;
@@ -1037,6 +1043,7 @@
             }
         }
         mSuppressFolderDeletion = false;
+        clearDragInfo();
     }
 
     @Thunk void replaceFolderWithFinalItem() {