mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
Clipboard handling adjustments for Android 13 (#1947)
* Android 13 clipboard tweaks * adjustments * adjustments round 2
This commit is contained in:
@@ -16,8 +16,10 @@ namespace Bit.iOS.Core.Services
|
||||
_stateService = stateService;
|
||||
}
|
||||
|
||||
public async Task CopyTextAsync(string text, int expiresInMs = -1)
|
||||
public async Task CopyTextAsync(string text, int expiresInMs = -1, bool isSensitive = true)
|
||||
{
|
||||
// isSensitive is only used by Android for now
|
||||
|
||||
int clearSeconds = -1;
|
||||
if (expiresInMs < 0)
|
||||
{
|
||||
@@ -36,5 +38,11 @@ namespace Bit.iOS.Core.Services
|
||||
ExpirationDate = clearSeconds > 0 ? NSDate.FromTimeIntervalSinceNow(clearSeconds) : null
|
||||
}));
|
||||
}
|
||||
|
||||
public bool IsCopyNotificationHandledByPlatform()
|
||||
{
|
||||
// return true for any future versions of iOS that notify the user when text is copied to the clipboard
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace Bit.iOS.Core.Utilities
|
||||
new StateMigrationService(liteDbStorage, preferencesStorage, secureStorageService);
|
||||
var deviceActionService = new DeviceActionService(stateService, messagingService);
|
||||
var clipboardService = new ClipboardService(stateService);
|
||||
var platformUtilsService = new MobilePlatformUtilsService(deviceActionService, messagingService,
|
||||
broadcasterService);
|
||||
var platformUtilsService = new MobilePlatformUtilsService(deviceActionService, clipboardService,
|
||||
messagingService, broadcasterService);
|
||||
var biometricService = new BiometricService(mobileStorageService);
|
||||
var cryptoFunctionService = new PclCryptoFunctionService(cryptoPrimitiveService);
|
||||
var cryptoService = new CryptoService(stateService, cryptoFunctionService);
|
||||
|
||||
Reference in New Issue
Block a user