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)
|
@Throws(ClipboardException::class)
|
||||||
fun cleanClipboard(label: String = "") {
|
fun cleanClipboard(label: String = "") {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
try {
|
||||||
getClipboardManager()?.clearPrimaryClip()
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
} else {
|
getClipboardManager()?.clearPrimaryClip()
|
||||||
copyToClipboard(label, "")
|
} else {
|
||||||
|
copyToClipboard(label, "")
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
throw ClipboardException(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user