diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-05 16:56:56 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2021-05-05 16:56:56 +0530 |
commit | e71c84a7857bb0ad637175ba938d08fcb86053b1 (patch) | |
tree | 8ae75dc8065e0421d59d359d5fb484821f1b2e4a /ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt | |
parent | 3474849b1dda66f270e1569a189cf58c113cb6f2 (diff) |
ui: replace deprecated string operations
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/preference/VersionPreference.kt | 5 |
1 files changed, 2 insertions, 3 deletions
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() } |