Don't let folder be replaced with final item twice.
Bug: 25732317
Change-Id: I77b3ddc8951583bebfb908fda934c9b80ddebce0
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 8c831b9..da895c6 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -452,6 +452,11 @@
mContent.snapToPageImmediately(0);
}
+ // This is set to true in close(), but isn't reset to false until onDropCompleted(). This
+ // leads to an consistent state if you drag out of the folder and drag back in without
+ // dropping. One resulting issue is that replaceFolderWithFinalItem() can be called twice.
+ mDeleteFolderOnDropCompleted = false;
+
Animator openFolderAnim = null;
final Runnable onCompleteRunnable;
if (!Utilities.ATLEAST_LOLLIPOP) {