diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/ItemTouchDispatcher.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ItemTouchDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/ItemTouchDispatcher.java index ad8bc1d..ab487ea 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ItemTouchDispatcher.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ItemTouchDispatcher.java @@ -47,14 +47,16 @@ public class ItemTouchDispatcher { minDistance + " vX " + vX + " vY " + vY); } - if (distance > minDistance && Math.abs(vX) > Math.abs(vY)) { - mItem.finishSwipe(vX > 0); - result = true; - } else { - mItem.stopSwipe(); + if (mItem != null) { + if (distance > minDistance && Math.abs(vX) > Math.abs(vY)) { + mItem.finishSwipe(vX > 0); + result = true; + } else { + mItem.stopSwipe(); + } + mItem = null; } - mItem = null; return result; } }); |