1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-31 15:43:19 +00:00

Crash fixes (#1869)

* Crash fixes

* added HasAutofillService to DeviceActionService
This commit is contained in:
mp-bw
2022-04-01 12:07:14 -04:00
committed by GitHub
parent 1f58b0cabe
commit 88f6b60b97
7 changed files with 29 additions and 18 deletions

View File

@@ -35,6 +35,7 @@ namespace Bit.App.Abstractions
void Background();
bool AutofillAccessibilityServiceRunning();
bool AutofillAccessibilityOverlayPermitted();
bool HasAutofillService();
bool AutofillServiceEnabled();
void DisableAutofillService();
bool AutofillServicesEnabled();

View File

@@ -192,7 +192,8 @@ namespace Bit.App.Pages
public void UpdateEnabled()
{
AutofillServiceToggled = _deviceActionService.AutofillServiceEnabled();
AutofillServiceToggled =
_deviceActionService.HasAutofillService() && _deviceActionService.AutofillServiceEnabled();
AccessibilityToggled = _deviceActionService.AutofillAccessibilityServiceRunning();
DrawOverToggled = _deviceActionService.AutofillAccessibilityOverlayPermitted();
}

View File

@@ -66,9 +66,9 @@ namespace Bit.App.Pages
public void Init(AppOptions appOptions)
{
_appOptions = appOptions;
Uri = appOptions.Uri;
Uri = appOptions?.Uri;
string name = null;
if (Uri.StartsWith(Constants.AndroidAppProtocol))
if (Uri?.StartsWith(Constants.AndroidAppProtocol) ?? false)
{
name = Uri.Substring(Constants.AndroidAppProtocol.Length);
}