Optimization

Avoid doing some useless processing.

Change-Id: I4ce0a188e10db30322bd25751dc5c09492cea301
This commit is contained in:
Jean Chalard 2012-03-02 20:26:51 +09:00
parent 7204eab3da
commit e2a50bd804

View file

@ -1742,9 +1742,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
throw new RuntimeException("Couldn't flip the indicator!");
}
}
final CharSequence textWithUnderline =
getTextWithUnderline(mWordComposer.getTypedWord());
if (!TextUtils.isEmpty(textWithUnderline)) {
if (mWordComposer.isComposingWord()) {
final CharSequence textWithUnderline =
getTextWithUnderline(mWordComposer.getTypedWord());
ic.setComposingText(textWithUnderline, 1);
}
}