mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
lock service fixes
This commit is contained in:
parent
f317f45d14
commit
3eb1ab0452
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,10 @@ namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(await IsLockedAsync())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
var lockOption = _platformUtilsService.LockTimeout();
|
var lockOption = _platformUtilsService.LockTimeout();
|
||||||
if(lockOption == null)
|
if(lockOption == null)
|
||||||
{
|
{
|
||||||
|
@ -77,9 +81,8 @@ namespace Bit.Core.Services
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var lockOptionsSeconds = lockOption.Value * 60;
|
|
||||||
var diff = DateTime.UtcNow - lastActive.Value;
|
var diff = DateTime.UtcNow - lastActive.Value;
|
||||||
if(diff.TotalSeconds >= lockOptionsSeconds)
|
if(diff.TotalSeconds >= lockOption.Value)
|
||||||
{
|
{
|
||||||
// need to lock now
|
// need to lock now
|
||||||
await LockAsync(true);
|
await LockAsync(true);
|
||||||
|
|
Loading…
Reference in a new issue