mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-22 11:35:21 +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