aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2022-06-30 17:00:19 -0300
committerTorsten Grote <t@grobox.de>2022-06-30 17:00:19 -0300
commitcd973fd346a65d4187dcc09c7fc38563fe3902b1 (patch)
treec55dda79cdbbba44201607d37df0c92e86213eca
parenta38443b8fe4149c78efbf01bc2dd8449323eaa9a (diff)
downloadtaler-android-cd973fd346a65d4187dcc09c7fc38563fe3902b1.tar.gz
taler-android-cd973fd346a65d4187dcc09c7fc38563fe3902b1.tar.bz2
taler-android-cd973fd346a65d4187dcc09c7fc38563fe3902b1.zip
Fix TalerUtils compile error
-rw-r--r--build.gradle8
-rw-r--r--taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt4
2 files changed, 6 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle
index 3179daa..150d31f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,10 +1,10 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.ktor_version = '2.0.1'
- ext.nav_version = '2.4.2'
- ext.material_version = '1.6.0'
+ ext.nav_version = '2.5.0'
+ ext.material_version = '1.6.1'
ext.lifecycle_version = '2.4.1'
- ext.constraintlayout_version = '2.1.3'
+ ext.constraintlayout_version = '2.1.4'
ext.junit_version = "4.13.2"
// check https://android-rebuilds.beuc.net/ for availability of free build tools
ext.build_tools_version = "30.0.3"
@@ -15,7 +15,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:7.2.1'
+ classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
diff --git a/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt b/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
index bb2e78a..e75e4c8 100644
--- a/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
+++ b/taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt
@@ -29,8 +29,8 @@ object TalerUtils {
// create a priority list of language ranges from system locales
val locales = LocaleListCompat.getDefault()
val priorityList = ArrayList<Locale.LanguageRange>(locales.size())
- for (i in 0 until locales.size()) {
- priorityList.add(Locale.LanguageRange(locales[i].toLanguageTag()))
+ for (i in 0 until locales.size()) locales[i]?.let { locale ->
+ priorityList.add(Locale.LanguageRange(locale.toLanguageTag()))
}
// create a list of locales available in the given map
val availableLocales = map.keys.mapNotNull {