aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-13 13:51:52 -0700
committerAllan Wang <me@allanwang.ca>2019-06-13 13:51:52 -0700
commite1849c9c633047979d8017262041e925ec3bd219 (patch)
treef1cc813655513195f118948c2cef28de649f4e47 /core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
parent6f97fd5f7c528594899e66d2d8b502a20ade6f53 (diff)
downloadkau-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.kt2
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)
}