diff options
author | 2011-10-19 15:30:03 +0900 | |
---|---|---|
committer | 2011-10-19 16:53:07 +0900 | |
commit | 82c8c2e6c00386ae9925fff68ea77bc448897cbd (patch) | |
tree | 6c8a1a1f9f1a673087b9ee41453e78327e7f19bb /java/src | |
parent | cc02aa8af35b85cb564503c7b54e1eae6a6b6169 (diff) | |
download | latinime-82c8c2e6c00386ae9925fff68ea77bc448897cbd.tar.gz latinime-82c8c2e6c00386ae9925fff68ea77bc448897cbd.tar.xz latinime-82c8c2e6c00386ae9925fff68ea77bc448897cbd.zip |
Add warning log for unexpected inputType
Bug: 5130446
Change-Id: I3484c75144ba68db0734a4d38186d2eafd1b1879
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 2bd173526..d12708db9 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -764,14 +764,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) |