mirror of
https://github.com/bitwarden/android.git
synced 2025-01-12 11:17:30 +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 SystemUiPackage = "com.android.systemui";
|
||||||
private const string BitwardenPackage = "com.x8bit.bitwarden";
|
private const string BitwardenPackage = "com.x8bit.bitwarden";
|
||||||
private const string BitwardenWebsite = "bitwarden.com";
|
private const string BitwardenWebsite = "bitwarden.com";
|
||||||
private const string BitwardenAccessibilityTag = "bw_access";
|
|
||||||
|
|
||||||
private static Dictionary<string, Browser> SupportedBrowsers => new List<Browser>
|
private static Dictionary<string, Browser> SupportedBrowsers => new List<Browser>
|
||||||
{
|
{
|
||||||
|
@ -67,10 +66,15 @@ namespace Bit.Android
|
||||||
|
|
||||||
private static HashSet<string> FilteredPackageNames => new HashSet<string>
|
private static HashSet<string> FilteredPackageNames => new HashSet<string>
|
||||||
{
|
{
|
||||||
|
SystemUiPackage,
|
||||||
"com.google.android.googlequicksearchbox",
|
"com.google.android.googlequicksearchbox",
|
||||||
"com.google.android.apps.nexuslauncher",
|
"com.google.android.apps.nexuslauncher",
|
||||||
"com.google.android.launcher",
|
"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;
|
private readonly IAppSettingsService _appSettings;
|
||||||
|
@ -82,12 +86,6 @@ namespace Bit.Android
|
||||||
_appSettings = Resolver.Resolve<IAppSettingsService>();
|
_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)
|
public override void OnAccessibilityEvent(AccessibilityEvent e)
|
||||||
{
|
{
|
||||||
var powerManager = (PowerManager)GetSystemService(PowerService);
|
var powerManager = (PowerManager)GetSystemService(PowerService);
|
||||||
|
@ -102,27 +100,18 @@ namespace Bit.Android
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(e.PackageName.Contains("logcat"))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(string.IsNullOrWhiteSpace(e?.PackageName) || FilteredPackageNames.Contains(e.PackageName) ||
|
if(string.IsNullOrWhiteSpace(e?.PackageName) || FilteredPackageNames.Contains(e.PackageName) ||
|
||||||
e.PackageName.Contains("launcher"))
|
e.PackageName.Contains("launcher"))
|
||||||
{
|
{
|
||||||
Log("FILTERED - " + e.PackageName + " fired event " + e.EventType);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(e.PackageName + " fired event " + e.EventType);
|
|
||||||
|
|
||||||
var root = RootInActiveWindow;
|
var root = RootInActiveWindow;
|
||||||
if(root == null || root.PackageName != e.PackageName)
|
if(root == null || root.PackageName != e.PackageName)
|
||||||
{
|
{
|
||||||
return;
|
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();
|
||||||
|
@ -230,13 +219,9 @@ namespace Bit.Android
|
||||||
notificationManager?.Dispose();
|
notificationManager?.Dispose();
|
||||||
root.Dispose();
|
root.Dispose();
|
||||||
e.Dispose();
|
e.Dispose();
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
// Suppress exceptions so that service doesn't crash
|
// Suppress exceptions so that service doesn't crash
|
||||||
catch(Exception ex)
|
catch { }
|
||||||
{
|
|
||||||
Log("Exception occurred: " + ex.Message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnInterrupt()
|
public override void OnInterrupt()
|
||||||
|
|
Loading…
Reference in a new issue