From 1bb678e455a03e1d64c78a00e612cafbedf2049d Mon Sep 17 00:00:00 2001 From: Contribucious <4764956+contribucious@users.noreply.github.com> Date: Wed, 1 Jul 2020 16:31:12 +0200 Subject: [PATCH] [KnownUsernameField] Compatibility with more browsers (#1000) --- src/Android/Accessibility/AccessibilityHelpers.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Android/Accessibility/AccessibilityHelpers.cs b/src/Android/Accessibility/AccessibilityHelpers.cs index 51d6ea05e..112399f79 100644 --- a/src/Android/Accessibility/AccessibilityHelpers.cs +++ b/src/Android/Accessibility/AccessibilityHelpers.cs @@ -308,11 +308,13 @@ namespace Bit.Droid.Accessibility public static AccessibilityNodeInfo GetUsernameEditText(string uriString, IEnumerable allEditTexts) { + string uriAuthority = null; string uriKey = null; string uriLocalPath = null; if (Uri.TryCreate(uriString, UriKind.Absolute, out var uri)) { - uriKey = uri.Authority; + uriAuthority = uri.Authority; + uriKey = uriAuthority.StartsWith("www.") ? uriAuthority.Substring(4) : uriAuthority; uriLocalPath = uri.LocalPath; }