diff options
author | 2012-02-22 00:24:19 -0800 | |
---|---|---|
committer | 2012-02-22 00:24:19 -0800 | |
commit | 8db74d0fae165ae5677fb9f7b2b631926eca9cc5 (patch) | |
tree | 8c118458de10b5564a94094d461daf9ee939fe08 /java/src/com/android/inputmethod/latin/LastComposedWord.java | |
parent | e043bf02f2b0a6428a0e6cae20e00cf4432c789f (diff) | |
parent | 193d23f40e1556074f323b7bd9695759f4798efe (diff) | |
download | latinime-8db74d0fae165ae5677fb9f7b2b631926eca9cc5.tar.gz latinime-8db74d0fae165ae5677fb9f7b2b631926eca9cc5.tar.xz latinime-8db74d0fae165ae5677fb9f7b2b631926eca9cc5.zip |
Merge "Use the stored separator instead of reading it back (A3)"
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; + } } |