summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2013-10-07 17:08:23 -0700
committerMichael Jurka <mikejurka@google.com>2013-10-07 17:08:42 -0700
commit39511301a29f1965155e848c214dfa4bc3530722 (patch)
tree772e5f2c5efccda115e540dbc87ae5e517e50cb6
parentcffa7175f8328cfbf6bc9ed1507f1900fe4bc85c (diff)
downloadandroid_packages_apps_Trebuchet-39511301a29f1965155e848c214dfa4bc3530722.tar.gz
android_packages_apps_Trebuchet-39511301a29f1965155e848c214dfa4bc3530722.tar.bz2
android_packages_apps_Trebuchet-39511301a29f1965155e848c214dfa4bc3530722.zip
Fix crash in crop view
Bug: 11120454
-rw-r--r--src/com/android/launcher3/CropView.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/com/android/launcher3/CropView.java b/src/com/android/launcher3/CropView.java
index f68f739d7..c8b974d01 100644
--- a/src/com/android/launcher3/CropView.java
+++ b/src/com/android/launcher3/CropView.java
@@ -197,13 +197,14 @@ public class CropView extends TiledImageView implements OnScaleGestureListener {
float squaredDist = (mFirstX - x) * (mFirstX - x) + (mFirstY - y) * (mFirstY - y);
float slop = config.getScaledTouchSlop() * config.getScaledTouchSlop();
long now = System.currentTimeMillis();
- // only do this if it's a small movement
- if (mTouchCallback != null &&
- squaredDist < slop &&
- now < mTouchDownTime + ViewConfiguration.getTapTimeout()) {
- mTouchCallback.onTap();
+ if (mTouchCallback != null) {
+ // only do this if it's a small movement
+ if (squaredDist < slop &&
+ now < mTouchDownTime + ViewConfiguration.getTapTimeout()) {
+ mTouchCallback.onTap();
+ }
+ mTouchCallback.onTouchUp();
}
- mTouchCallback.onTouchUp();
}
if (!mTouchEnabled) {