diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/WordComposer.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 324683c86..8a321e257 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -132,10 +132,15 @@ public final class WordComposer { * Number of keystrokes in the composing word. * @return the number of keystrokes */ - public final int size() { + // This may be made public if need be, but right now it's not used anywhere + /* package for tests */ int size() { return mCodePointSize; } + public boolean isSingleLetter() { + return size() == 1; + } + // When the composition contains trailing quotes, we don't pass them to the suggestion engine. // This is because "'tgis'" should be corrected to "'this'", but we can't afford to consider // single quotes as separators because of their very common use as apostrophes. |