mirror of
https://github.com/bitwarden/mobile.git
synced 2025-01-03 18:17:47 +01:00
more lock logging
This commit is contained in:
parent
83bc7c6d51
commit
d0b8c2c4bf
@ -44,22 +44,29 @@ namespace Bit.Core.Services
|
|||||||
|
|
||||||
public async Task<bool> IsLockedAsync()
|
public async Task<bool> IsLockedAsync()
|
||||||
{
|
{
|
||||||
|
var logService = ServiceContainer.Resolve<ILogService>("logService");
|
||||||
|
logService.Info("IsLockedAsync 1");
|
||||||
var hasKey = await _cryptoService.HasKeyAsync();
|
var hasKey = await _cryptoService.HasKeyAsync();
|
||||||
if(hasKey)
|
if(hasKey)
|
||||||
{
|
{
|
||||||
|
logService.Info("IsLockedAsync 2");
|
||||||
if(PinLocked)
|
if(PinLocked)
|
||||||
{
|
{
|
||||||
|
logService.Info("IsLockedAsync 3");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
logService.Info("IsLockedAsync 4");
|
||||||
var fingerprintSet = await IsFingerprintLockSetAsync();
|
var fingerprintSet = await IsFingerprintLockSetAsync();
|
||||||
if(fingerprintSet && FingerprintLocked)
|
if(fingerprintSet && FingerprintLocked)
|
||||||
{
|
{
|
||||||
|
logService.Info("IsLockedAsync 5");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logService.Info("IsLockedAsync 6");
|
||||||
return !hasKey;
|
return !hasKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,6 +119,8 @@ namespace Bit.Core.Services
|
|||||||
var pinSet = await IsPinLockSetAsync();
|
var pinSet = await IsPinLockSetAsync();
|
||||||
if(pinSet.Item1)
|
if(pinSet.Item1)
|
||||||
{
|
{
|
||||||
|
var logService = ServiceContainer.Resolve<ILogService>("logService");
|
||||||
|
logService.Info("LockAsync PinLocked = true");
|
||||||
PinLocked = true;
|
PinLocked = true;
|
||||||
}
|
}
|
||||||
if(await IsFingerprintLockSetAsync())
|
if(await IsFingerprintLockSetAsync())
|
||||||
|
Loading…
Reference in New Issue
Block a user