summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michael Jurka <mikejurka@google.com> 2011-09-02 15:28:06 -0700
committer Michael Jurka <mikejurka@google.com> 2011-09-02 15:28:06 -0700
commit21ce2d8caeda3c9eb762a2129d37c384de718941 (patch)
tree4ec6b1caf71027b65054ba7836e87dae129f8de0
parent52f159c79e4ed3367a929f4bc34ab3e184f82a15 (diff)
Fix a NPE in Recents
Change-Id: I8fead3b20646e92add6acd49440db675a190baee
-rw-r--r--packages/SystemUI/src/com/android/systemui/SwipeHelper.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
index 14743f48aa74..09d38d8a27c3 100644
--- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java
@@ -165,11 +165,13 @@ public class SwipeHelper {
case MotionEvent.ACTION_DOWN:
mDragging = false;
mCurrView = mCallback.getChildAtPosition(ev);
- mCurrAnimView = mCallback.getChildContentView(mCurrView);
- mCanCurrViewBeDimissed = mCallback.canChildBeDismissed(mCurrView);
mVelocityTracker.clear();
- mVelocityTracker.addMovement(ev);
- mInitialTouchPos = getPos(ev);
+ if (mCurrView != null) {
+ mCurrAnimView = mCallback.getChildContentView(mCurrView);
+ mCanCurrViewBeDimissed = mCallback.canChildBeDismissed(mCurrView);
+ mVelocityTracker.addMovement(ev);
+ mInitialTouchPos = getPos(ev);
+ }
break;
case MotionEvent.ACTION_MOVE:
if (mCurrView != null) {