From ce650c6f623185f43db897dde6ac9ab79becda3d Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 19 Jul 2023 17:38:20 +0530 Subject: chore: remove useless `OptIn` annotations --- app/src/main/java/app/passwordstore/Application.kt | 1 - .../app/passwordstore/ui/dialogs/PasswordGeneratorDialogFragment.kt | 1 - app/src/main/java/app/passwordstore/util/Perf.kt | 2 -- app/src/main/java/app/passwordstore/util/settings/GitSettings.kt | 2 -- .../src/test/kotlin/app/passwordstore/crypto/KeyUtilsTest.kt | 1 - .../main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt | 1 - 6 files changed, 8 deletions(-) diff --git a/app/src/main/java/app/passwordstore/Application.kt b/app/src/main/java/app/passwordstore/Application.kt index 9c7fe39a..279c6af0 100644 --- a/app/src/main/java/app/passwordstore/Application.kt +++ b/app/src/main/java/app/passwordstore/Application.kt @@ -33,7 +33,6 @@ import logcat.LogPriority.VERBOSE import logcat.LogcatLogger import logcat.logcat -@OptIn(ExperimentalStdlibApi::class) @Suppress("Unused") @HiltAndroidApp class Application : android.app.Application(), SharedPreferences.OnSharedPreferenceChangeListener { diff --git a/app/src/main/java/app/passwordstore/ui/dialogs/PasswordGeneratorDialogFragment.kt b/app/src/main/java/app/passwordstore/ui/dialogs/PasswordGeneratorDialogFragment.kt index 1130ffd1..da1a060a 100644 --- a/app/src/main/java/app/passwordstore/ui/dialogs/PasswordGeneratorDialogFragment.kt +++ b/app/src/main/java/app/passwordstore/ui/dialogs/PasswordGeneratorDialogFragment.kt @@ -37,7 +37,6 @@ import kotlinx.coroutines.flow.onEach import reactivecircus.flowbinding.android.widget.afterTextChanges import reactivecircus.flowbinding.android.widget.checkedChanges -@OptIn(ExperimentalStdlibApi::class) class PasswordGeneratorDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { diff --git a/app/src/main/java/app/passwordstore/util/Perf.kt b/app/src/main/java/app/passwordstore/util/Perf.kt index c56410f9..ebf3a8e2 100644 --- a/app/src/main/java/app/passwordstore/util/Perf.kt +++ b/app/src/main/java/app/passwordstore/util/Perf.kt @@ -4,7 +4,6 @@ package app.passwordstore.util import android.os.Looper -import kotlin.time.ExperimentalTime import kotlin.time.measureTime import logcat.logcat @@ -12,7 +11,6 @@ import logcat.logcat * Small helper to execute a given [block] and log the time it took to execute it. Intended for use * in day-to-day perf investigations and code using it should probably not be shipped. */ -@OptIn(ExperimentalTime::class) inline fun logExecutionTime(tag: String, crossinline block: () -> T): T { val res: T val duration = measureTime { res = block() } diff --git a/app/src/main/java/app/passwordstore/util/settings/GitSettings.kt b/app/src/main/java/app/passwordstore/util/settings/GitSettings.kt index b7422c99..56124104 100644 --- a/app/src/main/java/app/passwordstore/util/settings/GitSettings.kt +++ b/app/src/main/java/app/passwordstore/util/settings/GitSettings.kt @@ -26,7 +26,6 @@ enum class Protocol(val pref: String) { companion object { - @OptIn(ExperimentalStdlibApi::class) fun fromString(type: String?): Protocol { return entries.associateBy(Protocol::pref)[type ?: return Ssh] ?: throw IllegalArgumentException("$type is not a valid Protocol") @@ -42,7 +41,6 @@ enum class AuthMode(val pref: String) { companion object { - @OptIn(ExperimentalStdlibApi::class) fun fromString(type: String?): AuthMode { return entries.associateBy(AuthMode::pref)[type ?: return SshKey] ?: throw IllegalArgumentException("$type is not a valid AuthMode") diff --git a/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/KeyUtilsTest.kt b/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/KeyUtilsTest.kt index f8e4218e..a0f84402 100644 --- a/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/KeyUtilsTest.kt +++ b/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/KeyUtilsTest.kt @@ -24,7 +24,6 @@ class KeyUtilsTest { assertEquals("b950ae2813841585", keyId.toString()) } - @OptIn(ExperimentalStdlibApi::class) @Test fun isKeyUsable() { val params = AllKeys.entries.map { it to (it != AllKeys.AEAD_PUB && it != AllKeys.AEAD_SEC) } diff --git a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt index faf0ad4c..17a60456 100644 --- a/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt +++ b/passgen/random/src/main/kotlin/app/passwordstore/passgen/random/PasswordGenerator.kt @@ -7,7 +7,6 @@ package app.passwordstore.passgen.random import app.passwordstore.passgen.random.util.clearFlag import app.passwordstore.passgen.random.util.hasFlag -@OptIn(ExperimentalStdlibApi::class) public object PasswordGenerator { public const val DEFAULT_LENGTH: Int = 16 -- cgit v1.2.3