From e71c84a7857bb0ad637175ba938d08fcb86053b1 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 5 May 2021 16:56:56 +0530 Subject: ui: replace deprecated string operations Signed-off-by: Harsh Shandilya --- .../main/java/com/wireguard/android/preference/VersionPreference.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt') diff --git a/ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt b/ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt index 1ae4e9e6..a0c9e027 100644 --- a/ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt +++ b/ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt @@ -20,7 +20,6 @@ import com.wireguard.android.util.lifecycleScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import java.util.Locale class VersionPreference(context: Context, attrs: AttributeSet?) : Preference(context, attrs) { private var versionSummary: String? = null @@ -49,12 +48,12 @@ class VersionPreference(context: Context, attrs: AttributeSet?) : Preference(con init { lifecycleScope.launch { val backend = Application.getBackend() - versionSummary = getContext().getString(R.string.version_summary_checking, getBackendPrettyName(context, backend).toLowerCase(Locale.ENGLISH)) + versionSummary = getContext().getString(R.string.version_summary_checking, getBackendPrettyName(context, backend).lowercase()) notifyChanged() versionSummary = try { getContext().getString(R.string.version_summary, getBackendPrettyName(context, backend), withContext(Dispatchers.IO) { backend.version }) } catch (_: Throwable) { - getContext().getString(R.string.version_summary_unknown, getBackendPrettyName(context, backend).toLowerCase(Locale.ENGLISH)) + getContext().getString(R.string.version_summary_unknown, getBackendPrettyName(context, backend).lowercase()) } notifyChanged() } -- cgit v1.2.3