diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt b/app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt index d7fb13de..f9e9d474 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/Extensions.kt @@ -1172,7 +1172,7 @@ fun Iterable.averageOrNull() = this.average().let { if (it.isNaN()) null fun String.copyToClipboard(context: Context) { val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager val clipData = ClipData.newPlainText("Tekst", this) - clipboard.primaryClip = clipData + clipboard.setPrimaryClip(clipData) } fun TextView.getTextPosition(range: IntRange): Rect { diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/base/CrashActivity.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/base/CrashActivity.kt index 3ae649f6..bf8eab06 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/base/CrashActivity.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/base/CrashActivity.kt @@ -167,7 +167,7 @@ class CrashActivity : AppCompatActivity(), CoroutineScope { val clipboard = getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager clipboard?.apply { val clip = ClipData.newPlainText(getString(R.string.customactivityoncrash_error_activity_error_details_clipboard_label), errorInformation) - primaryClip = clip + setPrimaryClip(clip) Toast.makeText(this@CrashActivity, R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show() } } diff --git a/build.gradle b/build.gradle index c08e111d..3b24a9a9 100644 --- a/build.gradle +++ b/build.gradle @@ -10,10 +10,10 @@ buildscript { ] setup = [ - compileSdk: 28, + compileSdk: 30, buildTools: "28.0.3", minSdk : 16, - targetSdk : 28 + targetSdk : 30 ] versions = [