mirror of
https://github.com/bitwarden/mobile.git
synced 2024-12-01 13:04:02 +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()
|
public bool AutofillAccessibilityServiceRunning()
|
||||||
{
|
{
|
||||||
var activity = (MainActivity)CrossCurrentActivity.Current.Activity;
|
var enabledServices = Settings.Secure.GetString(Application.Context.ContentResolver,
|
||||||
var enabledServices = Settings.Secure.GetString(activity.ContentResolver,
|
|
||||||
Settings.Secure.EnabledAccessibilityServices);
|
Settings.Secure.EnabledAccessibilityServices);
|
||||||
return Application.Context.PackageName != null &&
|
return Application.Context.PackageName != null &&
|
||||||
(enabledServices?.Contains(Application.Context.PackageName) ?? false);
|
(enabledServices?.Contains(Application.Context.PackageName) ?? false);
|
||||||
|
Loading…
Reference in New Issue
Block a user