diff options
author | 2011-10-19 15:30:03 +0900 | |
---|---|---|
committer | 2011-10-19 18:52:07 +0900 | |
commit | 78674d0ff7f7126da9a2267b6c764f3222232b90 (patch) | |
tree | 4e1505fb63770e6b16bba60a8fed296434f04df7 /java/src | |
parent | 167f76aacbcfbc4963ce1eb8819f1bb2ad786d34 (diff) | |
download | latinime-78674d0ff7f7126da9a2267b6c764f3222232b90.tar.gz latinime-78674d0ff7f7126da9a2267b6c764f3222232b90.tar.xz latinime-78674d0ff7f7126da9a2267b6c764f3222232b90.zip |
Add warning log for unexpected inputType (DO NOT MERGE)
This is a cherry-pick of I3484c751 from Master.
Bug: 5130446
Change-Id: I140980bf093fb3310496c8021166d16f0ddc362f
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index c05913baa..05aa305f5 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -765,14 +765,24 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (attribute == null) return; final int inputType = attribute.inputType; + if (inputType == InputType.TYPE_NULL) { + // TODO: We should honor TYPE_NULL specification. + Log.i(TAG, "InputType.TYPE_NULL is specified"); + } + final int inputClass = inputType & InputType.TYPE_MASK_CLASS; final int variation = inputType & InputType.TYPE_MASK_VARIATION; + if (inputClass == 0) { + Log.w(TAG, String.format("Unexpected input class: inputType=0x%08x imeOptions=0x%08x", + inputType, attribute.imeOptions)); + } + mShouldInsertMagicSpace = false; mInputTypeNoAutoCorrect = false; mIsSettingsSuggestionStripOn = false; mApplicationSpecifiedCompletionOn = false; mApplicationSpecifiedCompletions = null; - if ((inputType & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_TEXT) { + if (inputClass == InputType.TYPE_CLASS_TEXT) { mIsSettingsSuggestionStripOn = true; // Make sure that passwords are not displayed in {@link SuggestionsView}. if (InputTypeCompatUtils.isPasswordInputType(inputType) |