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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user