Loading core/java/android/text/method/WordIterator.java +2 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class WordIterator implements Selection.PositionIterator { private void checkOffsetIsValid(int offset) { if (offset < 0 || offset > mCurrent.length()) { final String message = "Valid range is [0, " + mCurrent.length() + "]"; final String message = "Invalid offset: " + offset + ". Valid range is [0, " + mCurrent.length() + "]"; throw new IllegalArgumentException(message); } } Loading core/java/android/widget/TextView.java +7 −0 Original line number Diff line number Diff line Loading @@ -9163,6 +9163,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener public abstract void updatePosition(float x, float y); protected void positionAtCursorOffset(int offset) { // A HandleView relies on the layout, which may be nulled by external methods. if (mLayout == null) { // Will update controllers' state, hiding them and stopping selection mode if needed prepareCursorControllers(); return; } addPositionToTouchUpFilter(offset); final int line = mLayout.getLineForOffset(offset); final int lineBottom = mLayout.getLineBottom(line); Loading Loading
core/java/android/text/method/WordIterator.java +2 −1 Original line number Diff line number Diff line Loading @@ -213,7 +213,8 @@ public class WordIterator implements Selection.PositionIterator { private void checkOffsetIsValid(int offset) { if (offset < 0 || offset > mCurrent.length()) { final String message = "Valid range is [0, " + mCurrent.length() + "]"; final String message = "Invalid offset: " + offset + ". Valid range is [0, " + mCurrent.length() + "]"; throw new IllegalArgumentException(message); } } Loading
core/java/android/widget/TextView.java +7 −0 Original line number Diff line number Diff line Loading @@ -9163,6 +9163,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener public abstract void updatePosition(float x, float y); protected void positionAtCursorOffset(int offset) { // A HandleView relies on the layout, which may be nulled by external methods. if (mLayout == null) { // Will update controllers' state, hiding them and stopping selection mode if needed prepareCursorControllers(); return; } addPositionToTouchUpFilter(offset); final int line = mLayout.getLineForOffset(offset); final int lineBottom = mLayout.getLineBottom(line); Loading