Fixing regression where you can't add shortcuts
Change-Id: I2c91a9a5131591aa15319efdaf887f06fb593b08
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 618d62e..5e0d43d 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -657,8 +657,6 @@
}
private boolean beginDraggingWidget(View v) {
- Log.d(TAG, "begin dragging widget, view: " + v);
-
mDraggingWidget = true;
// Get the widget preview as the drag representation
ImageView image = (ImageView) v.findViewById(R.id.widget_preview);
@@ -671,17 +669,17 @@
return false;
}
- // This can happen in some weird cases involving multi-touch. We can't start dragging the
- // widget if this is null, so we break out.
- if (mCreateWidgetInfo == null) {
- return false;
- }
-
// Compose the drag image
Bitmap preview;
Bitmap outline;
float scale = 1f;
if (createItemInfo instanceof PendingAddWidgetInfo) {
+ // This can happen in some weird cases involving multi-touch. We can't start dragging
+ // the widget if this is null, so we break out.
+ if (mCreateWidgetInfo == null) {
+ return false;
+ }
+
PendingAddWidgetInfo createWidgetInfo = mCreateWidgetInfo;
createItemInfo = createWidgetInfo;
int spanX = createItemInfo.spanX;