diff --git a/src/Android/Autofill/Parser.cs b/src/Android/Autofill/Parser.cs index 37eaa756c..61bf8aae8 100644 --- a/src/Android/Autofill/Parser.cs +++ b/src/Android/Autofill/Parser.cs @@ -14,7 +14,7 @@ namespace Bit.Android.Autofill "com.opera.browser.beta","com.opera.mini.native","com.chrome.dev","com.chrome.canary", "com.google.android.apps.chrome","com.google.android.apps.chrome_dev","com.yandex.browser", "com.sec.android.app.sbrowser","com.sec.android.app.sbrowser.beta","org.codeaurora.swe.browser", - "com.amazon.cloud9","org.mozilla.klar" + "com.amazon.cloud9","org.mozilla.klar", "com.duckduckgo.mobile.android" }; private readonly AssistStructure _structure; @@ -87,6 +87,11 @@ namespace Bit.Android.Autofill var node = _structure.GetWindowNodeAt(i); ParseNode(node.RootViewNode); } + + if(!TrustedBrowsers.Contains(PackageName)) + { + WebDomain = null; + } } private void ParseNode(ViewNode node) @@ -95,11 +100,11 @@ namespace Bit.Android.Autofill var isEditText = node.ClassName == "android.widget.EditText" || node?.HtmlInfo?.Tag == "input"; if(isEditText || (hints?.Length ?? 0) > 0) { - if(PackageName == null) + if(string.IsNullOrWhiteSpace(PackageName)) { PackageName = node.IdPackage; } - if(WebDomain == null && TrustedBrowsers.Contains(node.IdPackage)) + if(string.IsNullOrWhiteSpace(WebDomain)) { WebDomain = node.WebDomain; } @@ -108,7 +113,7 @@ namespace Bit.Android.Autofill } else { - if(WebDomain == null && TrustedBrowsers.Contains(node.IdPackage)) + if(string.IsNullOrWhiteSpace(WebDomain)) { WebDomain = node.WebDomain; } diff --git a/src/Android/AutofillService.cs b/src/Android/AutofillService.cs index a32b727f8..1aec1c94e 100644 --- a/src/Android/AutofillService.cs +++ b/src/Android/AutofillService.cs @@ -60,7 +60,8 @@ namespace Bit.Android new Browser("com.ksmobile.cb", "address_bar_edit_text"), new Browser("acr.browser.lightning", "search"), new Browser("acr.browser.barebones", "search"), - new Browser("com.microsoft.emmx", "url_bar") + new Browser("com.microsoft.emmx", "url_bar"), + new Browser("com.duckduckgo.mobile.android", "omnibarTextInput") }.ToDictionary(n => n.PackageName); private readonly IAppSettingsService _appSettings;