1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

security settings for touch id and locking

This commit is contained in:
Kyle Spearrin
2016-05-21 22:50:15 -04:00
parent c408614a85
commit 29236f7462
5 changed files with 149 additions and 21 deletions

View File

@@ -19,6 +19,7 @@ using Plugin.Fingerprint.Abstractions;
using Plugin.Settings.Abstractions;
using System.Diagnostics;
using Xamarin.Forms;
using Bit.App;
namespace Bit.iOS
{
@@ -61,13 +62,17 @@ namespace Bit.iOS
public override void DidEnterBackground(UIApplication uiApplication)
{
var colourView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
// TODO: Make this an image view
var colorView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
{
BackgroundColor = UIColor.Black,
Tag = 4321
};
UIApplication.SharedApplication.KeyWindow.AddSubview(colourView);
UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(colourView);
UIApplication.SharedApplication.KeyWindow.AddSubview(colorView);
UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(colorView);
// Log the date/time we last backgrounded
CrossSettings.Current.AddOrUpdateValue(Constants.SettingLastBackgroundedDate, DateTime.UtcNow);
base.DidEnterBackground(uiApplication);
Debug.WriteLine("DidEnterBackground");
@@ -107,7 +112,7 @@ namespace Bit.iOS
private void SendLockMessage()
{
MessagingCenter.Send<App.App>(_app, "Lock");
MessagingCenter.Send(_app, "Lock");
}