From e2a50bd8049a8bd38a9154b510f9ccd047459e05 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 2 Mar 2012 20:26:51 +0900 Subject: [PATCH] Optimization Avoid doing some useless processing. Change-Id: I4ce0a188e10db30322bd25751dc5c09492cea301 --- java/src/com/android/inputmethod/latin/LatinIME.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 47eecafed..211b69a44 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -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); } }