1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-11 13:53:29 +00:00

checked for locked state on activity resume.

resolves #319
This commit is contained in:
Kyle Spearrin
2018-06-04 09:20:38 -04:00
parent ffc4e32119
commit c906f037b5
2 changed files with 13 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ namespace Bit.Android
private Java.Util.Regex.Pattern _otpPattern = Java.Util.Regex.Pattern.Compile("^.*?([cbdefghijklnrtuv]{32,64})$");
private IDeviceActionService _deviceActionService;
private IDeviceInfoService _deviceInfoService;
private IAppSettingsService _appSettingsService;
private ISettings _settings;
private AppOptions _appOptions;
@@ -71,6 +72,7 @@ namespace Bit.Android
_deviceActionService = Resolver.Resolve<IDeviceActionService>();
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
_appSettingsService = Resolver.Resolve<IAppSettingsService>();
_settings = Resolver.Resolve<ISettings>();
_appOptions = GetOptions();
LoadApplication(new App.App(
@@ -83,7 +85,7 @@ namespace Bit.Android
Resolver.Resolve<ILockService>(),
Resolver.Resolve<ILocalizeService>(),
Resolver.Resolve<IAppInfoService>(),
Resolver.Resolve<IAppSettingsService>(),
_appSettingsService,
_deviceActionService));
if(_appOptions?.Uri == null)
@@ -147,6 +149,11 @@ namespace Bit.Android
System.Diagnostics.Debug.WriteLine(e);
}
}
if(_appSettingsService.Locked)
{
MessagingCenter.Send(Xamarin.Forms.Application.Current, "Resumed", false);
}
}
protected override void OnNewIntent(Intent intent)