mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
more logging
This commit is contained in:
parent
d0b8c2c4bf
commit
07bc425046
1 changed files with 6 additions and 1 deletions
|
@ -109,6 +109,8 @@ namespace Bit.Core.Services
|
||||||
|
|
||||||
public async Task LockAsync(bool allowSoftLock = false, bool userInitiated = false)
|
public async Task LockAsync(bool allowSoftLock = false, bool userInitiated = false)
|
||||||
{
|
{
|
||||||
|
var logService = ServiceContainer.Resolve<ILogService>("logService");
|
||||||
|
logService.Info("LockAsync 1");
|
||||||
var authed = await _userService.IsAuthenticatedAsync();
|
var authed = await _userService.IsAuthenticatedAsync();
|
||||||
if(!authed)
|
if(!authed)
|
||||||
{
|
{
|
||||||
|
@ -116,24 +118,27 @@ namespace Bit.Core.Services
|
||||||
}
|
}
|
||||||
if(allowSoftLock)
|
if(allowSoftLock)
|
||||||
{
|
{
|
||||||
|
logService.Info("LockAsync 2");
|
||||||
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");
|
logService.Info("LockAsync PinLocked = true");
|
||||||
PinLocked = true;
|
PinLocked = true;
|
||||||
}
|
}
|
||||||
if(await IsFingerprintLockSetAsync())
|
if(await IsFingerprintLockSetAsync())
|
||||||
{
|
{
|
||||||
|
logService.Info("LockAsync 3");
|
||||||
FingerprintLocked = true;
|
FingerprintLocked = true;
|
||||||
}
|
}
|
||||||
if(FingerprintLocked || PinLocked)
|
if(FingerprintLocked || PinLocked)
|
||||||
{
|
{
|
||||||
|
logService.Info("LockAsync 4");
|
||||||
_messagingService.Send("locked", userInitiated);
|
_messagingService.Send("locked", userInitiated);
|
||||||
// TODO: locked callback?
|
// TODO: locked callback?
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logService.Info("LockAsync 5");
|
||||||
await Task.WhenAll(
|
await Task.WhenAll(
|
||||||
_cryptoService.ClearKeyAsync(),
|
_cryptoService.ClearKeyAsync(),
|
||||||
_cryptoService.ClearOrgKeysAsync(true),
|
_cryptoService.ClearOrgKeysAsync(true),
|
||||||
|
|
Loading…
Reference in a new issue