aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputConnection.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-02-17 11:46:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-17 11:46:54 +0000
commit782c9fee6bcb32d67c8ee9faa7e5c9dfb091afd3 (patch)
treede2d31c24e235611dc1b1677fc46638b3afd9b8b /java/src/com/android/inputmethod/latin/RichInputConnection.java
parentd91cd9919e309e72f912f5cb135792351d7081ac (diff)
parent7a7aeffcdcf1f25abdc3923e81fa19c2258fa9e9 (diff)
downloadlatinime-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/RichInputConnection.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputConnection.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 0d0b7a160..eb1899ca2 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -668,12 +668,16 @@ public final class RichInputConnection {
}
}
+ final boolean hasUrlSpans =
+ SpannableStringUtils.hasUrlSpans(before, startIndexInBefore, before.length())
+ || SpannableStringUtils.hasUrlSpans(after, 0, endIndexInAfter);
// We don't use TextUtils#concat because it copies all spans without respect to their
// nature. If the text includes a PARAGRAPH span and it has been split, then
// TextUtils#concat will crash when it tries to concat both sides of it.
return new TextRange(
SpannableStringUtils.concatWithNonParagraphSuggestionSpansOnly(before, after),
- startIndexInBefore, before.length() + endIndexInAfter, before.length());
+ startIndexInBefore, before.length() + endIndexInAfter, before.length(),
+ hasUrlSpans);
}
public boolean isCursorTouchingWord(final SpacingAndPunctuations spacingAndPunctuations) {