summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2012-05-16 17:18:33 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-16 17:18:33 -0700
commit534ea47ffd3a0c3c2e2c883200926393110d174c (patch)
tree888d034f3d0d51fab15dc94cd8e95bccd16b4026
parente8375ef55e7d196b98894f5cf6f479abc99188f5 (diff)
parentc93ea442024bb74691048b4cc342322385ac8cf7 (diff)
downloadandroid_packages_apps_Trebuchet-534ea47ffd3a0c3c2e2c883200926393110d174c.tar.gz
android_packages_apps_Trebuchet-534ea47ffd3a0c3c2e2c883200926393110d174c.tar.bz2
android_packages_apps_Trebuchet-534ea47ffd3a0c3c2e2c883200926393110d174c.zip
Merge "Yet another attempt to fix (issue 6282761)" into jb-dev
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java6
-rw-r--r--src/com/android/launcher2/PagedViewWidget.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index a3d8f8d40..dc2402214 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -669,6 +669,12 @@ 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;
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index f78aa4ca1..a6ea78f46 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -141,8 +141,8 @@ public class PagedViewWidget extends LinearLayout {
class CheckForShortPress implements Runnable {
public void run() {
+ if (sShortpressTarget != null) return;
if (mShortPressListener != null) {
- if (sShortpressTarget != null) return;
mShortPressListener.onShortPress(PagedViewWidget.this);
}
sShortpressTarget = PagedViewWidget.this;