Add more pointer validation check to ViewDragHelper.

Adding isPointerDown checks before modifying mInitialMotionX
and mLastMotionX arrays.

clearMotionHistory gets called on ACTION_POINTER_UP so there is
nothing to clear if we never got ACTION_POINTER_DOWN.

Merging to master manually as it has merge conflict due to support
library refactoring.

Bug: 29561625
Change-Id: I39c28dc58e0e96602d160c7168f5d555c147d27c
1 file changed