Skip to content
Snippets Groups Projects
Commit d1abf44b authored by Aleksandras Kostarevas's avatar Aleksandras Kostarevas
Browse files

Update shouldSuppressSuggestions to be less suppressive

parent 58a21d77
No related branches found
No related tags found
No related merge requests found
......@@ -101,14 +101,13 @@ public final class InputAttributes {
final boolean flagAutoComplete =
0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
final boolean forceNoSuggestionsByPrivateFlag = editorInfo.privateImeOptions != null
&& editorInfo.privateImeOptions.contains("org.futo.inputmethod.latin.NoSuggestions=1");
// TODO: Have a helper method in InputTypeUtils
// Make sure that passwords are not displayed in {@link SuggestionStripView}.
final boolean shouldSuppressSuggestions = mIsPasswordField
//|| InputTypeUtils.isEmailVariation(variation)
//|| InputType.TYPE_TEXT_VARIATION_URI == variation
//|| InputType.TYPE_TEXT_VARIATION_FILTER == variation
//|| flagNoSuggestions
|| flagAutoComplete;
|| forceNoSuggestionsByPrivateFlag;
mShouldShowSuggestions = !shouldSuppressSuggestions;
mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType);
......@@ -155,7 +154,7 @@ public final class InputAttributes {
noLearning = (mEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING) != 0;
}
mNoLearning = noLearning;
mNoLearning = noLearning || mIsPasswordField;
}
public boolean isTypeNull() {
......
......@@ -34,7 +34,8 @@ fun AndroidTextInput(allowPredictions: Boolean = true) {
inputType = EditorInfo.TYPE_CLASS_TEXT
isSingleLine = false
} else {
inputType = EditorInfo.TYPE_CLASS_TEXT or EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE
inputType = EditorInfo.TYPE_CLASS_TEXT
privateImeOptions = "org.futo.inputmethod.latin.NoSuggestions=1"
isSingleLine = true
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment