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 -- 4 files changed, 6 deletions(-) (limited to 'app/src') 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") -- cgit v1.2.3