mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Try to fix #465
This commit is contained in:
@@ -98,10 +98,14 @@ class ClipboardHelper(private val context: Context) {
|
||||
|
||||
@Throws(ClipboardException::class)
|
||||
fun cleanClipboard(label: String = "") {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
getClipboardManager()?.clearPrimaryClip()
|
||||
} else {
|
||||
copyToClipboard(label, "")
|
||||
try {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
getClipboardManager()?.clearPrimaryClip()
|
||||
} else {
|
||||
copyToClipboard(label, "")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
throw ClipboardException(e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user