aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/TextRange.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-17 03:48:50 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-17 03:48:50 -0800
commit5828d1f3fa4e3590297b432e003946b502ecfbd6 (patch)
tree8a5710296b99e8cc2bf59c7f330f2c58ba03d1d0 /java/src/com/android/inputmethod/latin/utils/TextRange.java
parentdaf28b45a4367b6877e895e8e8e43c6df1187074 (diff)
parent782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3 (diff)
downloadlatinime-5828d1f3fa4e3590297b432e003946b502ecfbd6.tar.gz
latinime-5828d1f3fa4e3590297b432e003946b502ecfbd6.tar.xz
latinime-5828d1f3fa4e3590297b432e003946b502ecfbd6.zip
am 782c9fee: Merge "Don\'t resume suggestion on links."
* commit '782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3': 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.java6
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