turn back on autofill stuff

This commit is contained in:
Kyle Spearrin 2018-02-01 17:17:18 -05:00
parent 8877e71bd2
commit 3a33ff375d

View file

@ -23,7 +23,6 @@ namespace Bit.Android
private const string SystemUiPackage = "com.android.systemui";
private const string BitwardenPackage = "com.x8bit.bitwarden";
private const string BitwardenWebsite = "bitwarden.com";
private const string BitwardenAccessibilityTag = "bw_access";
private static Dictionary<string, Browser> SupportedBrowsers => new List<Browser>
{
@ -67,10 +66,15 @@ namespace Bit.Android
private static HashSet<string> FilteredPackageNames => new HashSet<string>
{
SystemUiPackage,
"com.google.android.googlequicksearchbox",
"com.google.android.apps.nexuslauncher",
"com.google.android.launcher",
SystemUiPackage
"com.computer.desktop.ui.launcher",
"com.launcher.notelauncher",
"com.anddoes.launcher",
"com.actionlauncher.playstore",
"ch.deletescape.lawnchair.plah"
};
private readonly IAppSettingsService _appSettings;
@ -82,12 +86,6 @@ namespace Bit.Android
_appSettings = Resolver.Resolve<IAppSettingsService>();
}
private void Log(string message)
{
global::Android.Util.Log.WriteLine(global::Android.Util.LogPriority.Info,
BitwardenAccessibilityTag, message);
}
public override void OnAccessibilityEvent(AccessibilityEvent e)
{
var powerManager = (PowerManager)GetSystemService(PowerService);
@ -102,27 +100,18 @@ namespace Bit.Android
try
{
if(e.PackageName.Contains("logcat"))
{
return;
}
if(string.IsNullOrWhiteSpace(e?.PackageName) || FilteredPackageNames.Contains(e.PackageName) ||
e.PackageName.Contains("launcher"))
{
Log("FILTERED - " + e.PackageName + " fired event " + e.EventType);
return;
}
Log(e.PackageName + " fired event " + e.EventType);
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();
@ -230,13 +219,9 @@ namespace Bit.Android
notificationManager?.Dispose();
root.Dispose();
e.Dispose();
*/
}
// Suppress exceptions so that service doesn't crash
catch(Exception ex)
{
Log("Exception occurred: " + ex.Message);
}
catch { }
}
public override void OnInterrupt()