mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
catch exception on accessibility service running
This commit is contained in:
parent
8e1753ea37
commit
f6f6253eab
1 changed files with 12 additions and 5 deletions
|
@ -493,6 +493,8 @@ namespace Bit.Droid.Services
|
|||
}
|
||||
|
||||
public bool AutofillAccessibilityServiceRunning()
|
||||
{
|
||||
try
|
||||
{
|
||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||
var manager = activity.GetSystemService(Context.ActivityService) as ActivityManager;
|
||||
|
@ -500,6 +502,11 @@ namespace Bit.Droid.Services
|
|||
return services.Any(s => s.Process.ToLowerInvariant().Contains("bitwarden") &&
|
||||
s.Service.ClassName.ToLowerInvariant().Contains("accessibilityservice"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AutofillServiceEnabled()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue