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 {
|
||||
var result = ""
|
||||
val exif = ExifInterface(path)
|
||||
val exif = try {
|
||||
ExifInterface(path)
|
||||
} catch (e: Exception) {
|
||||
return ""
|
||||
}
|
||||
|
||||
val latLon = FloatArray(2)
|
||||
|
||||
if (exif.getLatLong(latLon)) {
|
||||
|
|
Loading…
Reference in New Issue