mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
23 lines
781 B
C#
23 lines
781 B
C#
using Android.Content;
|
|
using Bit.Core;
|
|
using Bit.Core.Abstractions;
|
|
using Bit.Core.Utilities;
|
|
using Bit.Droid.Utilities;
|
|
|
|
namespace Bit.Droid.Receivers
|
|
{
|
|
[BroadcastReceiver(Name = "com.x8bit.bitwarden.ClearClipboardAlarmReceiver", Exported = false)]
|
|
public class ClearClipboardAlarmReceiver : BroadcastReceiver
|
|
{
|
|
public override void OnReceive(Context context, Intent intent)
|
|
{
|
|
var clipboardManager = context.GetSystemService(Context.ClipboardService) as ClipboardManager;
|
|
if(StaticStore.LastClipboardValue != null && StaticStore.LastClipboardValue == clipboardManager.Text)
|
|
{
|
|
clipboardManager.Text = string.Empty;
|
|
}
|
|
StaticStore.LastClipboardValue = null;
|
|
}
|
|
}
|
|
}
|