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

Clipboard handling adjustments for Android 13 (#1947)

* Android 13 clipboard tweaks

* adjustments

* adjustments round 2
This commit is contained in:
mp-bw
2022-06-10 12:02:17 -04:00
committed by GitHub
parent dd6003bd4f
commit 48a8d9ae35
13 changed files with 84 additions and 43 deletions

View File

@@ -20,6 +20,7 @@ namespace Bit.App.Services
private const int DialogPromiseExpiration = 600000; // 10 minutes
private readonly IDeviceActionService _deviceActionService;
private readonly IClipboardService _clipboardService;
private readonly IMessagingService _messagingService;
private readonly IBroadcasterService _broadcasterService;
@@ -28,10 +29,12 @@ namespace Bit.App.Services
public MobilePlatformUtilsService(
IDeviceActionService deviceActionService,
IClipboardService clipboardService,
IMessagingService messagingService,
IBroadcasterService broadcasterService)
{
_deviceActionService = deviceActionService;
_clipboardService = clipboardService;
_messagingService = messagingService;
_broadcasterService = broadcasterService;
}
@@ -129,6 +132,15 @@ namespace Bit.App.Services
return true;
}
public void ShowToastForCopiedValue(string valueNameCopied)
{
if (!_clipboardService.IsCopyNotificationHandledByPlatform())
{
ShowToast("info", null,
string.Format(AppResources.ValueHasBeenCopied, valueNameCopied));
}
}
public bool SupportsFido2()
{
return _deviceActionService.SupportsFido2();