diff options
Diffstat (limited to 'src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r-- | src/com/android/inputmethod/latin/WordComposer.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/android/inputmethod/latin/WordComposer.java b/src/com/android/inputmethod/latin/WordComposer.java index 50725d481..e97cb24ba 100644 --- a/src/com/android/inputmethod/latin/WordComposer.java +++ b/src/com/android/inputmethod/latin/WordComposer.java @@ -36,6 +36,8 @@ public class WordComposer { private StringBuilder mTypedWord; private int mCapsCount; + + private boolean mAutoCapitalized; /** * Whether the user chose to capitalize the word. @@ -152,4 +154,21 @@ public class WordComposer { public boolean isMostlyCaps() { return mCapsCount > 1; } + + /** + * Saves the reason why the word is capitalized - whether it was automatic or + * due to the user hitting shift in the middle of a sentence. + * @param auto whether it was an automatic capitalization due to start of sentence + */ + public void setAutoCapitalized(boolean auto) { + mAutoCapitalized = auto; + } + + /** + * Returns whether the word was automatically capitalized. + * @return whether the word was automatically capitalized + */ + public boolean isAutoCapitalized() { + return mAutoCapitalized; + } } |