[Android] LocaleUtils: remove obsolete sdk version check
Duncan McNamara
git at videolan.org
Wed Apr 27 06:36:50 UTC 2022
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Apr 20 16:07:03 2022 +0200| [9c63bd368cbc766e4c77506a2cd01b17988cfa33] | committer: Nicolas Pomepuy
LocaleUtils: remove obsolete sdk version check
> https://code.videolan.org/videolan/vlc-android/commit/9c63bd368cbc766e4c77506a2cd01b17988cfa33
---
.../tools/src/main/java/org/videolan/tools/LocaleUtils.kt | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/application/tools/src/main/java/org/videolan/tools/LocaleUtils.kt b/application/tools/src/main/java/org/videolan/tools/LocaleUtils.kt
index 931dcff55..04b817a49 100644
--- a/application/tools/src/main/java/org/videolan/tools/LocaleUtils.kt
+++ b/application/tools/src/main/java/org/videolan/tools/LocaleUtils.kt
@@ -96,13 +96,8 @@ fun ContextWrapper.wrap(language: String): ContextWrapper {
}
}
- return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
- val context = baseContext.createConfigurationContext(config)
- ContextWrapper(context)
- } else {
- baseContext.resources.updateConfiguration(config, baseContext.resources.displayMetrics)
- ContextWrapper(baseContext)
- }
+ val context = baseContext.createConfigurationContext(config)
+ return ContextWrapper(context)
}
@Suppress("DEPRECATION")
More information about the Android
mailing list