mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-04-16 03:07:20 +02:00
catch exceptions at fetching photo gps coordinates
This commit is contained in:
parent
b5f72faf2d
commit
8e8f23e6d1
@ -102,7 +102,12 @@ abstract class ViewPagerFragment : Fragment() {
|
|||||||
|
|
||||||
private fun getLatLonAltitude(path: String): String {
|
private fun getLatLonAltitude(path: String): String {
|
||||||
var result = ""
|
var result = ""
|
||||||
val exif = ExifInterface(path)
|
val exif = try {
|
||||||
|
ExifInterface(path)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
val latLon = FloatArray(2)
|
val latLon = FloatArray(2)
|
||||||
|
|
||||||
if (exif.getLatLong(latLon)) {
|
if (exif.getLatLong(latLon)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user