simplify setting mShouldShowSuggestions, heed flagNoSuggestions

This commit is contained in:
Helium314 2022-03-10 18:51:08 +01:00 committed by GitHub
parent a5c45318a7
commit 66967eb2a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,13 +105,7 @@ public final class InputAttributes {
// TODO: Have a helper method in InputTypeUtils // TODO: Have a helper method in InputTypeUtils
// Make sure that passwords are not displayed in {@link SuggestionStripView}. // Make sure that passwords are not displayed in {@link SuggestionStripView}.
final boolean shouldSuppressSuggestions = mIsPasswordField; mShouldShowSuggestions = !(mIsPasswordField || flagNoSuggestions);
//|| InputTypeUtils.isEmailVariation(variation)
//|| InputType.TYPE_TEXT_VARIATION_URI == variation
//|| InputType.TYPE_TEXT_VARIATION_FILTER == variation
//|| flagNoSuggestions
//|| flagAutoComplete;
mShouldShowSuggestions = !shouldSuppressSuggestions;
mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType); mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType);