diff options
-rw-r--r-- | src/com/android/launcher3/CropView.java | 13 |
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) { |