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 17:53:15 +0900
committerJean Chalard <jchalard@google.com>2014-02-17 20:36:16 +0900
commit7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9 (patch)
treef14239d7f6b9add8d18b11a091c6250d4fc7a1a9 /java/src/com/android/inputmethod/latin/utils/TextRange.java
parent1e9897b0c77b858ae479d531732b6795aaf0b2de (diff)
downloadlatinime-7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9.tar.gz
latinime-7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9.tar.xz
latinime-7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9.zip
Don't resume suggestion on links.
Bug: 11447084 Change-Id: I5bd558b9dd85d1505aa918f44e8ac3e52ec42d97
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