read RootInActiveWindow after launcher checks

This commit is contained in:
Kyle Spearrin 2018-02-01 16:12:30 -05:00
parent 854ef7e645
commit 99d1a6d043

View file

@ -94,16 +94,19 @@ namespace Bit.Android
try try
{ {
var root = RootInActiveWindow; if(string.IsNullOrWhiteSpace(e?.PackageName) || e.PackageName == SystemUiPackage ||
e.PackageName.Contains("launcher"))
/*
if(e == null || root == null || string.IsNullOrWhiteSpace(e.PackageName) ||
e.PackageName == SystemUiPackage || e.PackageName.Contains("launcher") ||
root.PackageName != e.PackageName)
{ {
return; 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 testNodes = GetWindowNodes(root, e, n => n.ViewIdResourceName != null && n.Text != null, false);
//var testNodesData = testNodes.Select(n => new { id = n.ViewIdResourceName, text = n.Text }); //var testNodesData = testNodes.Select(n => new { id = n.ViewIdResourceName, text = n.Text });
//testNodes.Dispose(); //testNodes.Dispose();