This commit is contained in:
Tommaso Berlose
2021-05-11 18:46:08 +02:00
parent 7edb0635a7
commit 61fc0da8d0
35 changed files with 197 additions and 10 deletions

View File

@ -176,7 +176,7 @@ object ColorHelper {
fun Context.isClipboardColor(): Boolean {
with(getSystemService(CLIPBOARD_SERVICE) as ClipboardManager) {
return primaryClip?.getItemAt(0)?.text?.toString()?.isColor() ?: false
return try { primaryClip?.getItemAt(0)?.text?.toString()?.isColor() ?: false } catch (ex: Exception) { false }
}
}