aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/InputAttributes.java
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-11-21 16:32:18 +0900
committerKen Wakasa <kwakasa@google.com>2012-11-21 16:32:18 +0900
commit6779985ba2e80eb8a07a833bb91838c98c82d525 (patch)
treeab1fce7ce28eb106593fc3dfc07fa48efc8d457e /java/src/com/android/inputmethod/latin/InputAttributes.java
parent76e5188f4e62e07c235b36ab466de6ad1cf56054 (diff)
parent40f7b43b3f0f2845cc005a901c911637c8c591ca (diff)
downloadlatinime-6779985ba2e80eb8a07a833bb91838c98c82d525.tar.gz
latinime-6779985ba2e80eb8a07a833bb91838c98c82d525.tar.xz
latinime-6779985ba2e80eb8a07a833bb91838c98c82d525.zip
Merge remote-tracking branch 'goog/master' into mergescriptpackage
Diffstat (limited to 'java/src/com/android/inputmethod/latin/InputAttributes.java')
-rw-r--r--java/src/com/android/inputmethod/latin/InputAttributes.java5
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 6c1e0301a..1c5bff383 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.