diff options
author | 2012-02-21 23:48:37 -0800 | |
---|---|---|
committer | 2012-02-21 23:56:36 -0800 | |
commit | 193d23f40e1556074f323b7bd9695759f4798efe (patch) | |
tree | aa99e3dc31b091511c17c0553f4effdb53fd438e /java/src/com/android/inputmethod/latin/LastComposedWord.java | |
parent | 66bb563535dbe3672f99f75bd71763a551444867 (diff) | |
download | latinime-193d23f40e1556074f323b7bd9695759f4798efe.tar.gz latinime-193d23f40e1556074f323b7bd9695759f4798efe.tar.xz latinime-193d23f40e1556074f323b7bd9695759f4798efe.zip |
Use the stored separator instead of reading it back (A3)
Now that we have stored our committing separator, we can use
it directly instead of reading it back from the text view
paying the IPC cost. This prepares for feature request #5968922.
Change-Id: Ifeaa2d659cf12b91c89d28e6ff7d07a669258184
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LastComposedWord.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LastComposedWord.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java index f0b91b104..d32b22d4f 100644 --- a/java/src/com/android/inputmethod/latin/LastComposedWord.java +++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java @@ -76,4 +76,12 @@ public class LastComposedWord { return mActive && !TextUtils.isEmpty(mCommittedWord) && !TextUtils.equals(mTypedWord, mCommittedWord); } + + public boolean didCommitTypedWord() { + return TextUtils.equals(mTypedWord, mCommittedWord); + } + + public static int getSeparatorLength(final int separatorCode) { + return NOT_A_SEPARATOR == separatorCode ? 0 : 1; + } } |