diff options
author | 2012-11-20 19:38:47 -0800 | |
---|---|---|
committer | 2012-11-20 19:38:47 -0800 | |
commit | b7e6bbaebcfc0707890cd17a15f70688a01217a7 (patch) | |
tree | 4159057050aa98a7fb47ba1fc99d0324562e90ba /java/src/com/android/inputmethod/latin/InputAttributes.java | |
parent | 37fbcb0ddf2bf61f0e432534b671596b1b6f897e (diff) | |
parent | 3acd0c7a9f4a5f17897a4fe51b023d6f14ba7ef0 (diff) | |
download | latinime-b7e6bbaebcfc0707890cd17a15f70688a01217a7.tar.gz latinime-b7e6bbaebcfc0707890cd17a15f70688a01217a7.tar.xz latinime-b7e6bbaebcfc0707890cd17a15f70688a01217a7.zip |
am 3acd0c7a: am f732f4dd: Merge "Only add spaces automatically when appropriate." into jb-mr1.1-dev
* commit '3acd0c7a9f4a5f17897a4fe51b023d6f14ba7ef0':
Only add spaces automatically when appropriate.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/InputAttributes.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/InputAttributes.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index 2f7608a03..422fc72d3 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -29,6 +29,7 @@ public final class InputAttributes { final public boolean mInputTypeNoAutoCorrect; final public boolean mIsSettingsSuggestionStripOn; final public boolean mApplicationSpecifiedCompletionOn; + final public boolean mShouldInsertSpacesAutomatically; final private int mInputType; public InputAttributes(final EditorInfo editorInfo, final boolean isFullscreenMode) { @@ -54,6 +55,7 @@ public final class InputAttributes { mIsSettingsSuggestionStripOn = false; mInputTypeNoAutoCorrect = false; mApplicationSpecifiedCompletionOn = false; + mShouldInsertSpacesAutomatically = false; } else { final int variation = inputType & InputType.TYPE_MASK_VARIATION; final boolean flagNoSuggestions = @@ -65,6 +67,7 @@ public final class InputAttributes { final boolean flagAutoComplete = 0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE); + // TODO: Have a helper method in InputTypeUtils // Make sure that passwords are not displayed in {@link SuggestionStripView}. if (InputTypeUtils.isPasswordInputType(inputType) || InputTypeUtils.isVisiblePasswordInputType(inputType) @@ -78,6 +81,8 @@ public final class InputAttributes { mIsSettingsSuggestionStripOn = true; } + mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType); + // If it's a browser edit field and auto correct is not ON explicitly, then // disable auto correction, but keep suggestions on. // If NO_SUGGESTIONS is set, don't do prediction. |