aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/InputAttributes.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2014-05-20 10:21:57 +0900
committerTadashi G. Takaoka <takaoka@google.com>2014-05-20 10:26:26 +0900
commit9fb27977141bdccc3bbd0cacc71ba6ba8d7a71dc (patch)
tree25fc7e64b45d37797ebcea0be069fb9c4cb84046 /java/src/com/android/inputmethod/latin/InputAttributes.java
parent437be2d5c4ee60f9c880369985eadde4a3a22957 (diff)
downloadlatinime-9fb27977141bdccc3bbd0cacc71ba6ba8d7a71dc.tar.gz
latinime-9fb27977141bdccc3bbd0cacc71ba6ba8d7a71dc.tar.xz
latinime-9fb27977141bdccc3bbd0cacc71ba6ba8d7a71dc.zip
Fix number password field handling
Bug: 15088419 Change-Id: Ie88375c8c8203c318d9b410692c527443cb0a2d5
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, 2 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java
index 726b3d141..df4948322 100644
--- a/java/src/com/android/inputmethod/latin/InputAttributes.java
+++ b/java/src/com/android/inputmethod/latin/InputAttributes.java
@@ -46,6 +46,8 @@ public final class InputAttributes {
final int inputType = null != editorInfo ? editorInfo.inputType : 0;
final int inputClass = inputType & InputType.TYPE_MASK_CLASS;
mInputType = inputType;
+ mIsPasswordField = InputTypeUtils.isPasswordInputType(inputType)
+ || InputTypeUtils.isVisiblePasswordInputType(inputType);
if (inputClass != InputType.TYPE_CLASS_TEXT) {
// If we are not looking at a TYPE_CLASS_TEXT field, the following strange
// cases may arise, so we do a couple sanity checks for them. If it's a
@@ -61,7 +63,6 @@ public final class InputAttributes {
Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x"
+ " imeOptions=0x%08x", inputType, editorInfo.imeOptions));
}
- mIsPasswordField = false;
mIsSettingsSuggestionStripOn = false;
mInputTypeNoAutoCorrect = false;
mApplicationSpecifiedCompletionOn = false;
@@ -79,8 +80,6 @@ public final class InputAttributes {
final boolean flagAutoComplete =
0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
- mIsPasswordField = InputTypeUtils.isPasswordInputType(inputType)
- || InputTypeUtils.isVisiblePasswordInputType(inputType);
// TODO: Have a helper method in InputTypeUtils
// Make sure that passwords are not displayed in {@link SuggestionStripView}.
final boolean noSuggestionStrip = mIsPasswordField