parent
6305d974eb
commit
85bfd9d79a
@ -30,7 +30,7 @@ internal abstract class GeocoderWeatherProvider(
|
|||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
geocoder.getFromLocationName(query, 10)
|
geocoder.getFromLocationName(query, 10)
|
||||||
} catch (e: IOException) {
|
} catch (e: Exception) {
|
||||||
CrashReporter.logException(e)
|
CrashReporter.logException(e)
|
||||||
emptyList()
|
emptyList()
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ internal abstract class GeocoderWeatherProvider(
|
|||||||
Geocoder(context).getFromLocation(lat, lon, 1)
|
Geocoder(context).getFromLocation(lat, lon, 1)
|
||||||
?.firstOrNull()
|
?.firstOrNull()
|
||||||
?.formatToString() ?: formatLatLon(lat, lon)
|
?.formatToString() ?: formatLatLon(lat, lon)
|
||||||
} catch (e: IOException) {
|
} catch (e: Exception) {
|
||||||
CrashReporter.logException(e)
|
CrashReporter.logException(e)
|
||||||
formatLatLon(lat, lon)
|
formatLatLon(lat, lon)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user