mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
turn back on autofill stuff
This commit is contained in:
parent
8877e71bd2
commit
3a33ff375d
1 changed files with 7 additions and 22 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue