mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
parent
ffc4e32119
commit
c906f037b5
2 changed files with 13 additions and 6 deletions
|
@ -28,6 +28,7 @@ namespace Bit.Android
|
||||||
private Java.Util.Regex.Pattern _otpPattern = Java.Util.Regex.Pattern.Compile("^.*?([cbdefghijklnrtuv]{32,64})$");
|
private Java.Util.Regex.Pattern _otpPattern = Java.Util.Regex.Pattern.Compile("^.*?([cbdefghijklnrtuv]{32,64})$");
|
||||||
private IDeviceActionService _deviceActionService;
|
private IDeviceActionService _deviceActionService;
|
||||||
private IDeviceInfoService _deviceInfoService;
|
private IDeviceInfoService _deviceInfoService;
|
||||||
|
private IAppSettingsService _appSettingsService;
|
||||||
private ISettings _settings;
|
private ISettings _settings;
|
||||||
private AppOptions _appOptions;
|
private AppOptions _appOptions;
|
||||||
|
|
||||||
|
@ -71,6 +72,7 @@ namespace Bit.Android
|
||||||
|
|
||||||
_deviceActionService = Resolver.Resolve<IDeviceActionService>();
|
_deviceActionService = Resolver.Resolve<IDeviceActionService>();
|
||||||
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
|
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
|
||||||
|
_appSettingsService = Resolver.Resolve<IAppSettingsService>();
|
||||||
_settings = Resolver.Resolve<ISettings>();
|
_settings = Resolver.Resolve<ISettings>();
|
||||||
_appOptions = GetOptions();
|
_appOptions = GetOptions();
|
||||||
LoadApplication(new App.App(
|
LoadApplication(new App.App(
|
||||||
|
@ -83,7 +85,7 @@ namespace Bit.Android
|
||||||
Resolver.Resolve<ILockService>(),
|
Resolver.Resolve<ILockService>(),
|
||||||
Resolver.Resolve<ILocalizeService>(),
|
Resolver.Resolve<ILocalizeService>(),
|
||||||
Resolver.Resolve<IAppInfoService>(),
|
Resolver.Resolve<IAppInfoService>(),
|
||||||
Resolver.Resolve<IAppSettingsService>(),
|
_appSettingsService,
|
||||||
_deviceActionService));
|
_deviceActionService));
|
||||||
|
|
||||||
if(_appOptions?.Uri == null)
|
if(_appOptions?.Uri == null)
|
||||||
|
@ -147,6 +149,11 @@ namespace Bit.Android
|
||||||
System.Diagnostics.Debug.WriteLine(e);
|
System.Diagnostics.Debug.WriteLine(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_appSettingsService.Locked)
|
||||||
|
{
|
||||||
|
MessagingCenter.Send(Xamarin.Forms.Application.Current, "Resumed", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNewIntent(Intent intent)
|
protected override void OnNewIntent(Intent intent)
|
||||||
|
|
|
@ -78,14 +78,14 @@ namespace Bit.App
|
||||||
MainPage = new ExtendedNavigationPage(new HomePage());
|
MainPage = new ExtendedNavigationPage(new HomePage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS)
|
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, forceLock) =>
|
||||||
{
|
{
|
||||||
MessagingCenter.Subscribe<Application, bool>(Current, "Resumed", async (sender, forceLock) =>
|
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(forceLock));
|
||||||
|
if(Device.RuntimePlatform == Device.iOS)
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(async () => await _lockService.CheckLockAsync(forceLock));
|
|
||||||
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
|
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async override void OnStart()
|
protected async override void OnStart()
|
||||||
|
|
Loading…
Reference in a new issue