mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 16:42:38 +00:00
prevent crash on null clipdata text
This commit is contained in:
1 file changed
+1
-1
@@ -172,7 +172,7 @@ object GeodeUtils {
|
||||
val manager = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
val clip = manager.primaryClip
|
||||
if (clip != null && clip.itemCount > 0) {
|
||||
return clip.getItemAt(0).text.toString()
|
||||
return clip.getItemAt(0).coerceToText(this).toString()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
|
||||
Reference in new issue
Block a user