mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
catch exceptions at fetching photo gps coordinates
This commit is contained in:
parent
b5f72faf2d
commit
8e8f23e6d1
1 changed files with 6 additions and 1 deletions
|
@ -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 a new issue