Set compile and target SDK to 33

This commit is contained in:
MM20 2022-08-21 18:39:12 +02:00
parent 042c0e2040
commit 6b09380eed
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
3 changed files with 6 additions and 6 deletions

View File

@ -269,7 +269,7 @@ open class LocalFile(
loc.indexOf('/')
).toDouble()
val list = Geocoder(context).getFromLocation(lon, lat, 1)
if (list.size > 0) {
if (list != null && list.size > 0) {
metaData.add(R.string.file_meta_location to list[0].formatToString())
}
}
@ -290,7 +290,7 @@ open class LocalFile(
val loc = exif.latLong
if (loc != null && Geocoder.isPresent()) {
val list = Geocoder(context).getFromLocation(loc[0], loc[1], 1)
if (list.size > 0) {
if (list != null && list.size > 0) {
metaData.add(R.string.file_meta_location to list[0].formatToString())
}
}

View File

@ -37,8 +37,8 @@ dependencyResolutionManagement {
versionCatalogs {
create("sdk") {
version("minSdk", "26")
version("compileSdk", "32")
version("targetSdk", "32")
version("compileSdk", "33")
version("targetSdk", "33")
}
create("libs") {
version("kotlin", "1.7.10")

View File

@ -38,7 +38,7 @@ abstract class LatLonWeatherProvider : WeatherProvider<LatLonWeatherLocation>()
CrashReporter.logException(e)
emptyList()
}
}
} ?: emptyList()
return locations.mapNotNull {
LatLonWeatherLocation(
lat = it.latitude,
@ -72,7 +72,7 @@ abstract class LatLonWeatherProvider : WeatherProvider<LatLonWeatherLocation>()
return withContext(Dispatchers.IO) {
try {
Geocoder(context).getFromLocation(lat, lon, 1)
.firstOrNull()
?.firstOrNull()
?.formatToString() ?: formatLatLon(lat, lon)
} catch (e: IOException) {
CrashReporter.logException(e)