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!"); throw new RuntimeException("Couldn't flip the indicator!");
} }
} }
if (mWordComposer.isComposingWord()) {
final CharSequence textWithUnderline = final CharSequence textWithUnderline =
getTextWithUnderline(mWordComposer.getTypedWord()); getTextWithUnderline(mWordComposer.getTypedWord());
if (!TextUtils.isEmpty(textWithUnderline)) {
ic.setComposingText(textWithUnderline, 1); ic.setComposingText(textWithUnderline, 1);
} }
} }