mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
CheckForLockInBackground removed
This commit is contained in:
parent
be65597d57
commit
ea7290afab
3 changed files with 2 additions and 7 deletions
|
@ -6,7 +6,6 @@ namespace Bit.App.Abstractions
|
|||
{
|
||||
public interface ILockService
|
||||
{
|
||||
bool CheckForLockInBackground { get; set; }
|
||||
void UpdateLastActivity();
|
||||
Task<LockType> GetLockTypeAsync(bool forceLock);
|
||||
Task CheckLockAsync(bool forceLock);
|
||||
|
|
|
@ -80,9 +80,9 @@ namespace Bit.App
|
|||
|
||||
if(Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, args) =>
|
||||
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, forceLock) =>
|
||||
{
|
||||
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(args));
|
||||
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(forceLock));
|
||||
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
|
||||
});
|
||||
}
|
||||
|
@ -93,7 +93,6 @@ namespace Bit.App
|
|||
protected async override void OnStart()
|
||||
{
|
||||
// Handle when your app starts
|
||||
_lockService.CheckForLockInBackground = false;
|
||||
await _lockService.CheckLockAsync(false);
|
||||
|
||||
if(string.IsNullOrWhiteSpace(_options.Uri))
|
||||
|
@ -116,7 +115,6 @@ namespace Bit.App
|
|||
protected override void OnSleep()
|
||||
{
|
||||
// Handle when your app sleeps
|
||||
_lockService.CheckForLockInBackground = true;
|
||||
Debug.WriteLine("OnSleep");
|
||||
|
||||
SetMainPageFromAutofill();
|
||||
|
@ -130,7 +128,6 @@ namespace Bit.App
|
|||
protected async override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
_lockService.CheckForLockInBackground = false;
|
||||
|
||||
// workaround for app compat bug
|
||||
// ref https://forums.xamarin.com/discussion/62414/app-resuming-results-in-crash-with-formsappcompatactivity
|
||||
|
|
|
@ -31,7 +31,6 @@ namespace Bit.App.Services
|
|||
_fingerprint = fingerprint;
|
||||
}
|
||||
|
||||
public bool CheckForLockInBackground { get; set; } = true;
|
||||
public double CurrentLockTime { get; set; }
|
||||
|
||||
public void UpdateLastActivity()
|
||||
|
|
Loading…
Reference in a new issue