aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-06-24 17:39:17 +0900
committerJean Chalard <jchalard@google.com>2013-06-24 17:39:17 +0900
commitca52e1ca5abf8d233e901f76e5d443c427602316 (patch)
tree1ab2e651124b03b81bc7a421717eedbf666d0717 /java/src
parentc074c3357c3bb0dfe92fff90bccbcab2b6ec422e (diff)
downloadlatinime-ca52e1ca5abf8d233e901f76e5d443c427602316.tar.gz
latinime-ca52e1ca5abf8d233e901f76e5d443c427602316.tar.xz
latinime-ca52e1ca5abf8d233e901f76e5d443c427602316.zip
Fix a small bug
SpannableStrings are not the only type of Spanned, they are only the mutable kind. SpannedString is the immutable one. Spanned is the correct class to use there. Bug: 8839763 Bug: 8862327 Change-Id: Ic5e6199a51f22368914f2748ac2d0d1ca6a33f78
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 57eaa3836..6a9a8c86b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -43,7 +43,7 @@ import android.os.Message;
import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.text.InputType;
-import android.text.SpannableString;
+import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.SuggestionSpan;
import android.util.Log;
@@ -2500,10 +2500,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
final CharSequence word = range.mWord;
final String typedWord = word.toString();
- if (word instanceof SpannableString) {
- final SpannableString spannableString = (SpannableString)word;
+ if (word instanceof Spanned) {
+ final Spanned spanned = (Spanned)word;
int i = 0;
- for (Object object : spannableString.getSpans(0, spannableString.length(),
+ for (Object object : spanned.getSpans(0, spanned.length(),
SuggestionSpan.class)) {
SuggestionSpan span = (SuggestionSpan)object;
for (String s : span.getSuggestions()) {