mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
Handle if GetState is null in biometric integrity check (#1082)
This commit is contained in:
parent
0388738e02
commit
a50e66faf4
1 changed files with 9 additions and 2 deletions
|
@ -17,7 +17,10 @@ namespace Bit.iOS.Core.Services
|
||||||
public async Task<bool> SetupBiometricAsync()
|
public async Task<bool> SetupBiometricAsync()
|
||||||
{
|
{
|
||||||
var state = GetState();
|
var state = GetState();
|
||||||
|
if (state != null)
|
||||||
|
{
|
||||||
await _storageService.SaveAsync("biometricState", ToBase64(state));
|
await _storageService.SaveAsync("biometricState", ToBase64(state));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -35,9 +38,13 @@ namespace Bit.iOS.Core.Services
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var state = GetState();
|
var state = GetState();
|
||||||
|
if (state != null)
|
||||||
|
{
|
||||||
return FromBase64(oldState).Equals(state);
|
return FromBase64(oldState).Equals(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private NSData GetState()
|
private NSData GetState()
|
||||||
|
|
Loading…
Reference in a new issue