Merge "Fix a small bug"
commit
cdf774122d
|
@ -43,7 +43,7 @@ import android.os.Message;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.text.SpannableString;
|
import android.text.Spanned;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.style.SuggestionSpan;
|
import android.text.style.SuggestionSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -2517,10 +2517,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
|
final ArrayList<SuggestedWordInfo> suggestions = CollectionUtils.newArrayList();
|
||||||
final CharSequence word = range.mWord;
|
final CharSequence word = range.mWord;
|
||||||
final String typedWord = word.toString();
|
final String typedWord = word.toString();
|
||||||
if (word instanceof SpannableString) {
|
if (word instanceof Spanned) {
|
||||||
final SpannableString spannableString = (SpannableString)word;
|
final Spanned spanned = (Spanned)word;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (Object object : spannableString.getSpans(0, spannableString.length(),
|
for (Object object : spanned.getSpans(0, spanned.length(),
|
||||||
SuggestionSpan.class)) {
|
SuggestionSpan.class)) {
|
||||||
SuggestionSpan span = (SuggestionSpan)object;
|
SuggestionSpan span = (SuggestionSpan)object;
|
||||||
for (String s : span.getSuggestions()) {
|
for (String s : span.getSuggestions()) {
|
||||||
|
|
Loading…
Reference in New Issue