diff --git a/src/Android/AutofillService.cs b/src/Android/AutofillService.cs index bf19006c3..60e29ece7 100644 --- a/src/Android/AutofillService.cs +++ b/src/Android/AutofillService.cs @@ -94,16 +94,19 @@ namespace Bit.Android try { - var root = RootInActiveWindow; - - /* - if(e == null || root == null || string.IsNullOrWhiteSpace(e.PackageName) || - e.PackageName == SystemUiPackage || e.PackageName.Contains("launcher") || - root.PackageName != e.PackageName) + if(string.IsNullOrWhiteSpace(e?.PackageName) || e.PackageName == SystemUiPackage || + e.PackageName.Contains("launcher")) { return; } + var root = RootInActiveWindow; + if(root == null || root.PackageName != e.PackageName) + { + return; + } + + /* //var testNodes = GetWindowNodes(root, e, n => n.ViewIdResourceName != null && n.Text != null, false); //var testNodesData = testNodes.Select(n => new { id = n.ViewIdResourceName, text = n.Text }); //testNodes.Dispose();