mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add warning log for unexpected inputType
Bug: 5130446 Change-Id: I3484c75144ba68db0734a4d38186d2eafd1b1879
This commit is contained in:
parent
cc02aa8af3
commit
82c8c2e6c0
@ -764,14 +764,24 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
|||||||
if (attribute == null)
|
if (attribute == null)
|
||||||
return;
|
return;
|
||||||
final int inputType = attribute.inputType;
|
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;
|
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;
|
mShouldInsertMagicSpace = false;
|
||||||
mInputTypeNoAutoCorrect = false;
|
mInputTypeNoAutoCorrect = false;
|
||||||
mIsSettingsSuggestionStripOn = false;
|
mIsSettingsSuggestionStripOn = false;
|
||||||
mApplicationSpecifiedCompletionOn = false;
|
mApplicationSpecifiedCompletionOn = false;
|
||||||
mApplicationSpecifiedCompletions = null;
|
mApplicationSpecifiedCompletions = null;
|
||||||
|
|
||||||
if ((inputType & InputType.TYPE_MASK_CLASS) == InputType.TYPE_CLASS_TEXT) {
|
if (inputClass == InputType.TYPE_CLASS_TEXT) {
|
||||||
mIsSettingsSuggestionStripOn = true;
|
mIsSettingsSuggestionStripOn = true;
|
||||||
// Make sure that passwords are not displayed in {@link SuggestionsView}.
|
// Make sure that passwords are not displayed in {@link SuggestionsView}.
|
||||||
if (InputTypeCompatUtils.isPasswordInputType(inputType)
|
if (InputTypeCompatUtils.isPasswordInputType(inputType)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user