mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 08:13:20 +00:00
Better way of checking for autofill sevrice running
This commit is contained in:
@@ -19,7 +19,6 @@ namespace Bit.Android
|
||||
private const string BitwardenPackage = "com.x8bit.bitwarden";
|
||||
private const string BitwardenWebsite = "bitwarden.com";
|
||||
|
||||
public static bool Enabled { get; set; } = false;
|
||||
private static Dictionary<string, Browser> SupportedBrowsers => new List<Browser>
|
||||
{
|
||||
new Browser("com.android.chrome", "url_bar"),
|
||||
@@ -54,7 +53,6 @@ namespace Bit.Android
|
||||
|
||||
public override void OnAccessibilityEvent(AccessibilityEvent e)
|
||||
{
|
||||
Enabled = true;
|
||||
var root = RootInActiveWindow;
|
||||
if(string.IsNullOrWhiteSpace(e.PackageName) || e.PackageName == SystemUiPackage ||
|
||||
root?.PackageName != e.PackageName)
|
||||
@@ -116,18 +114,6 @@ namespace Bit.Android
|
||||
|
||||
}
|
||||
|
||||
protected override void OnServiceConnected()
|
||||
{
|
||||
base.OnServiceConnected();
|
||||
Enabled = true;
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
Enabled = false;
|
||||
}
|
||||
|
||||
private void CancelNotification()
|
||||
{
|
||||
var notificationManager = ((NotificationManager)GetSystemService(NotificationService));
|
||||
|
||||
Reference in New Issue
Block a user