Initial change to queue up install/uninstall operations while dragging (Bug 6276881)

Change-Id: I68ad881e38711d8d9a8903ab18d30ef4385833d7
This commit is contained in:
Winson Chung
2012-05-03 11:20:19 -07:00
parent 2ceccf83f4
commit f561bdf68d
3 changed files with 115 additions and 15 deletions
+8 -2
View File
@@ -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());
}
/**