Skip to content

Commit 21ce2d8

Browse files
committed
Fix a NPE in Recents
Change-Id: I8fead3b20646e92add6acd49440db675a190baee
1 parent 52f159c commit 21ce2d8

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)