diff options
author | 2014-02-17 11:46:54 +0000 | |
---|---|---|
committer | 2014-02-17 11:46:54 +0000 | |
commit | 782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3 (patch) | |
tree | de2d31c24e235611dc1b1677fc46638b3afd9b8b /java/src/com/android/inputmethod/latin/utils/TextRange.java | |
parent | d91cd9919e309e72f912f5cb135792351d7081ac (diff) | |
parent | 7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9 (diff) | |
download | latinime-782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3.tar.gz latinime-782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3.tar.xz latinime-782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3.zip |
Merge "Don't resume suggestion on links."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/TextRange.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/TextRange.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/TextRange.java b/java/src/com/android/inputmethod/latin/utils/TextRange.java index 48b443ddd..dbf3b5060 100644 --- a/java/src/com/android/inputmethod/latin/utils/TextRange.java +++ b/java/src/com/android/inputmethod/latin/utils/TextRange.java @@ -31,6 +31,7 @@ public final class TextRange { private final int mCursorIndex; public final CharSequence mWord; + public final boolean mHasUrlSpans; public int getNumberOfCharsInWordBeforeCursor() { return mCursorIndex - mWordAtCursorStartIndex; @@ -95,7 +96,7 @@ public final class TextRange { } } if (spanStart == mWordAtCursorStartIndex && spanEnd == mWordAtCursorEndIndex) { - // If the span does not start and stop here, we ignore it. It probably extends + // If the span does not start and stop here, ignore it. It probably extends // past the start or end of the word, as happens in missing space correction // or EasyEditSpans put by voice input. spans[writeIndex++] = spans[readIndex]; @@ -105,7 +106,7 @@ public final class TextRange { } public TextRange(final CharSequence textAtCursor, final int wordAtCursorStartIndex, - final int wordAtCursorEndIndex, final int cursorIndex) { + final int wordAtCursorEndIndex, final int cursorIndex, final boolean hasUrlSpans) { if (wordAtCursorStartIndex < 0 || cursorIndex < wordAtCursorStartIndex || cursorIndex > wordAtCursorEndIndex || wordAtCursorEndIndex > textAtCursor.length()) { @@ -115,6 +116,7 @@ public final class TextRange { mWordAtCursorStartIndex = wordAtCursorStartIndex; mWordAtCursorEndIndex = wordAtCursorEndIndex; mCursorIndex = cursorIndex; + mHasUrlSpans = hasUrlSpans; mWord = mTextAtCursor.subSequence(mWordAtCursorStartIndex, mWordAtCursorEndIndex); } }
\ No newline at end of file |