mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
fix for crash when checking for running accessibility service without activity (#1591)
This commit is contained in:
parent
1ebad6bca5
commit
4ed7491116
1 changed files with 1 additions and 2 deletions
|
@ -640,8 +640,7 @@ namespace Bit.Droid.Services
|
|||
|
||||
public bool AutofillAccessibilityServiceRunning()
|
||||
{
|
||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
||||
var enabledServices = Settings.Secure.GetString(activity.ContentResolver,
|
||||
var enabledServices = Settings.Secure.GetString(Application.Context.ContentResolver,
|
||||
Settings.Secure.EnabledAccessibilityServices);
|
||||
return Application.Context.PackageName != null &&
|
||||
(enabledServices?.Contains(Application.Context.PackageName) ?? false);
|
||||
|
|
Loading…
Reference in a new issue