am 03709c78: Merge "Text selection: update touch delta when moving towards handles" into mnc-dev

* commit '03709c780ae26a2b27d098782364ba722e711564':
  Text selection: update touch delta when moving towards handles
This commit is contained in:
Mady Mellor
2015-06-18 17:28:04 +00:00
committed by Android Git Automerger

View File

@@ -4157,6 +4157,11 @@ public class Editor {
offset = adjustedOffset;
}
positionCursor = true;
} else if (adjustedOffset < mPreviousOffset) {
// Handle has jumped to the start of the word, and the user is moving
// their finger towards the handle, the delta should be updated.
mTouchWordDelta = mTextView.convertToLocalHorizontalCoordinate(x)
- layout.getPrimaryHorizontal(mPreviousOffset);
}
}
@@ -4291,6 +4296,11 @@ public class Editor {
offset = adjustedOffset;
}
positionCursor = true;
} else if (adjustedOffset > mPreviousOffset) {
// Handle has jumped to the end of the word, and the user is moving
// their finger towards the handle, the delta should be updated.
mTouchWordDelta = layout.getPrimaryHorizontal(mPreviousOffset)
- mTextView.convertToLocalHorizontalCoordinate(x);
}
}