mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
exclude search fields from password filter
This commit is contained in:
parent
4879d906d9
commit
186f839569
2 changed files with 11 additions and 5 deletions
|
@ -25,6 +25,7 @@ namespace Bit.Android.Autofill
|
||||||
Visible = node.Visibility == ViewStates.Visible;
|
Visible = node.Visibility == ViewStates.Visible;
|
||||||
Hints = FilterForSupportedHints(node.GetAutofillHints());
|
Hints = FilterForSupportedHints(node.GetAutofillHints());
|
||||||
AutofillOptions = node.GetAutofillOptions()?.ToList();
|
AutofillOptions = node.GetAutofillOptions()?.ToList();
|
||||||
|
Node = node;
|
||||||
|
|
||||||
if(node.AutofillValue != null)
|
if(node.AutofillValue != null)
|
||||||
{
|
{
|
||||||
|
@ -76,6 +77,7 @@ namespace Bit.Android.Autofill
|
||||||
public long? DateValue { get; set; }
|
public long? DateValue { get; set; }
|
||||||
public int? ListValue { get; set; }
|
public int? ListValue { get; set; }
|
||||||
public bool? ToggleValue { get; set; }
|
public bool? ToggleValue { get; set; }
|
||||||
|
public ViewNode Node { get; private set; }
|
||||||
|
|
||||||
private void UpdateSaveTypeFromHints()
|
private void UpdateSaveTypeFromHints()
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,10 +60,14 @@ namespace Bit.Android.Autofill
|
||||||
{
|
{
|
||||||
_passwordFields = Fields
|
_passwordFields = Fields
|
||||||
.Where(f =>
|
.Where(f =>
|
||||||
f.InputType.HasFlag(InputTypes.TextVariationPassword) ||
|
!f.IdEntry.ToLowerInvariant().Contains("search") &&
|
||||||
f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) ||
|
(!f.Node.Hint?.ToLowerInvariant().Contains("search") ?? true) &&
|
||||||
f.InputType.HasFlag(InputTypes.TextVariationWebPassword))
|
(
|
||||||
.ToList();
|
f.InputType.HasFlag(InputTypes.TextVariationPassword) ||
|
||||||
|
f.InputType.HasFlag(InputTypes.TextVariationVisiblePassword) ||
|
||||||
|
f.InputType.HasFlag(InputTypes.TextVariationWebPassword)
|
||||||
|
)
|
||||||
|
).ToList();
|
||||||
if(!_passwordFields.Any())
|
if(!_passwordFields.Any())
|
||||||
{
|
{
|
||||||
_passwordFields = Fields.Where(f => f.IdEntry?.ToLower().Contains("password") ?? false).ToList();
|
_passwordFields = Fields.Where(f => f.IdEntry?.ToLower().Contains("password") ?? false).ToList();
|
||||||
|
|
Loading…
Reference in a new issue