summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Workspace.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/Workspace.java')
-rw-r--r--src/com/android/launcher2/Workspace.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index ec18fb3e3..ab8c26c85 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -38,8 +38,6 @@ import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.Region.Op;
import android.graphics.drawable.Drawable;
@@ -381,12 +379,20 @@ public class Workspace extends SmoothPagedView
mIsDragOccuring = true;
updateChildrenLayersEnabled();
mLauncher.lockScreenOrientation();
+
+ // Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
+ InstallShortcutReceiver.enableInstallQueue();
+ UninstallShortcutReceiver.enableUninstallQueue();
}
public void onDragEnd() {
mIsDragOccuring = false;
updateChildrenLayersEnabled();
mLauncher.unlockScreenOrientation(false);
+
+ // Re-enable any Un/InstallShortcutReceiver and now process any queued items
+ InstallShortcutReceiver.disableAndFlushInstallQueue(getContext());
+ UninstallShortcutReceiver.disableAndFlushUninstallQueue(getContext());
}
/**