diff options
author | Allan Wang <me@allanwang.ca> | 2019-06-13 13:51:52 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-06-13 13:51:52 -0700 |
commit | e1849c9c633047979d8017262041e925ec3bd219 (patch) | |
tree | f1cc813655513195f118948c2cef28de649f4e47 /core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | |
parent | 6f97fd5f7c528594899e66d2d8b502a20ade6f53 (diff) | |
download | kau-e1849c9c633047979d8017262041e925ec3bd219.tar.gz kau-e1849c9c633047979d8017262041e925ec3bd219.tar.bz2 kau-e1849c9c633047979d8017262041e925ec3bd219.zip |
Update to sdk 29 and update changelog
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt index e8680dc..d002fb8 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt @@ -239,7 +239,7 @@ fun Context.hasPermission(permissions: String) = !buildIsMarshmallowAndUp || Con fun Context.copyToClipboard(text: String?, label: String = "Copied Text", showToast: Boolean = true) { val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager - clipboard.primaryClip = ClipData.newPlainText(label, text ?: "") + clipboard.setPrimaryClip(ClipData.newPlainText(label, text ?: "")) if (showToast) toast(R.string.kau_text_copied) } |