summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/widget/ViewDragHelper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/dialer/widget/ViewDragHelper.java b/src/com/android/dialer/widget/ViewDragHelper.java
index a0e1d801b..c0bc2ce29 100644
--- a/src/com/android/dialer/widget/ViewDragHelper.java
+++ b/src/com/android/dialer/widget/ViewDragHelper.java
@@ -1548,6 +1548,12 @@ public class ViewDragHelper {
* deltas that it consumed.
*/
public void processNestedScroll(View target, int dx, int dy, int[] consumed) {
+ if (mCapturedView == null) {
+ // This is safe because consumed array is null when called from
+ // onNestedScroll, and pre-initialized to {0, 0} when called from
+ // onNestedPreScroll.
+ return;
+ }
final int targetX = mCapturedView.getLeft() + dx;
final int targetY = mCapturedView.getTop() + dy;
dragTo(targetX, targetY, dx, dy);