mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-24 16:38:22 +01:00
fix for crash when checking for running accessibility service without activity (#1591)
This commit is contained in:
parent
1ebad6bca5
commit
4ed7491116
@ -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 New Issue
Block a user