1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 01:53:17 +00:00

lock alarm

This commit is contained in:
Kyle Spearrin
2019-05-16 12:30:20 -04:00
parent 84c9516659
commit 290e90ba8e
5 changed files with 86 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
using Android.Content;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
namespace Bit.Droid.Receivers
{
[BroadcastReceiver(Name = "com.x8bit.bitwarden.LockAlarmReceiver", Exported = false)]
public class LockAlarmReceiver : BroadcastReceiver
{
public async override void OnReceive(Context context, Intent intent)
{
System.Diagnostics.Debug.WriteLine("LockAlarmReceiver OnReceive");
var lockService = ServiceContainer.Resolve<ILockService>("lockService");
await lockService.CheckLockAsync();
}
}
}

View File

@@ -0,0 +1,16 @@
using System;
using Android.App;
using Android.Content;
namespace Bit.Droid.Receivers
{
[BroadcastReceiver(Name = "com.x8bit.bitwarden.PackageReplacedReceiver", Exported = false)]
[IntentFilter(new[] { Intent.ActionMyPackageReplaced })]
public class PackageReplacedReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
System.Diagnostics.Debug.WriteLine("PackageReplacedReceiver OnReceive");
}
}
}