1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-12 14:23:26 +00:00

Use monotonic clock for vault timeout (#1175)

* Use monotonic clock for vault timeout

* free memory

* removed vault timeout timers and added crash logging to iOS clock hack
This commit is contained in:
Matt Portune
2020-12-14 15:29:30 -05:00
committed by GitHub
parent 3227daddaf
commit acf2e4360f
11 changed files with 98 additions and 96 deletions

View File

@@ -430,6 +430,13 @@ namespace Bit.iOS.Core.Services
return false;
}
public long GetActiveTime()
{
// Fall back to UnixTimeSeconds in case this approach stops working. We'll lose clock-change protection but
// the lock functionality will continue to work.
return iOSHelpers.GetSystemUpTimeSeconds() ?? DateTimeOffset.UtcNow.ToUnixTimeSeconds();
}
private void ImagePicker_FinishedPickingMedia(object sender, UIImagePickerMediaPickedEventArgs e)
{
if (sender is UIImagePickerController picker)