summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2012-05-17 13:43:29 -0700
committerAdam Cohen <adamcohen@google.com>2012-05-17 13:45:09 -0700
commit9247892015dad231c5005aa021c3e3416265ed80 (patch)
tree1600f3ef43bf2437b584bf6c964ad07ce4321e4c /src/com/android/launcher2
parent263301a391c5eaa7a1f651d79c79c863c60e496a (diff)
downloadandroid_packages_apps_Trebuchet-9247892015dad231c5005aa021c3e3416265ed80.tar.gz
android_packages_apps_Trebuchet-9247892015dad231c5005aa021c3e3416265ed80.tar.bz2
android_packages_apps_Trebuchet-9247892015dad231c5005aa021c3e3416265ed80.zip
Fixing regression where you can't add shortcuts
Change-Id: I2c91a9a5131591aa15319efdaf887f06fb593b08
Diffstat (limited to 'src/com/android/launcher2')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 618d62e55..5e0d43dcc 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -657,8 +657,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
}
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 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
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;