Skip to content

Commit ccbc2f3

Browse files
mikejurkaAndroid (Google) Code Review
authored andcommitted
Merge "Fix a NPE in Recents"
2 parents f743338 + 21ce2d8 commit ccbc2f3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/SystemUI/src/com/android/systemui/SwipeHelper.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,13 @@ public boolean onInterceptTouchEvent(MotionEvent ev) {
165165
case MotionEvent.ACTION_DOWN:
166166
mDragging = false;
167167
mCurrView = mCallback.getChildAtPosition(ev);
168-
mCurrAnimView = mCallback.getChildContentView(mCurrView);
169-
mCanCurrViewBeDimissed = mCallback.canChildBeDismissed(mCurrView);
170168
mVelocityTracker.clear();
171-
mVelocityTracker.addMovement(ev);
172-
mInitialTouchPos = getPos(ev);
169+
if (mCurrView != null) {
170+
mCurrAnimView = mCallback.getChildContentView(mCurrView);
171+
mCanCurrViewBeDimissed = mCallback.canChildBeDismissed(mCurrView);
172+
mVelocityTracker.addMovement(ev);
173+
mInitialTouchPos = getPos(ev);
174+
}
173175
break;
174176
case MotionEvent.ACTION_MOVE:
175177
if (mCurrView != null) {

0 commit comments

Comments
 (0)