1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-11 05:43:30 +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

@@ -43,23 +43,22 @@ namespace Bit.Droid.Services
public Task<bool> ValidateIntegrityAsync(string bioIntegrityKey = null)
{
// bioIntegrityKey used in iOS only
if (Build.VERSION.SdkInt < BuildVersionCodes.M)
{
return Task.FromResult(true);
}
_keystore.Load(null);
IKey key = _keystore.GetKey(KeyName, null);
Cipher cipher = Cipher.GetInstance(Transformation);
if (key == null || cipher == null)
{
return Task.FromResult(true);
}
try
{
_keystore.Load(null);
var key = _keystore.GetKey(KeyName, null);
var cipher = Cipher.GetInstance(Transformation);
if (key == null || cipher == null)
{
return Task.FromResult(true);
}
cipher.Init(CipherMode.EncryptMode, key);
}
catch (KeyPermanentlyInvalidatedException e)