From cd973fd346a65d4187dcc09c7fc38563fe3902b1 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 30 Jun 2022 17:00:19 -0300 Subject: Fix TalerUtils compile error --- build.gradle | 8 ++++---- taler-kotlin-android/src/main/java/net/taler/common/TalerUtils.kt | 4 ++-- 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(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 { -- cgit v1.2.3