mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-19 06:48:00 +01:00
catch exceptions thrown at trying to show the image on a map
This commit is contained in:
parent
ed99b03f8a
commit
8d7853e4f0
1 changed files with 7 additions and 1 deletions
|
@ -644,7 +644,13 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showOnMap() {
|
private fun showOnMap() {
|
||||||
val exif = ExifInterface(getCurrentPath())
|
val exif: ExifInterface
|
||||||
|
try {
|
||||||
|
exif = ExifInterface(getCurrentPath())
|
||||||
|
} catch (e: Exception) {
|
||||||
|
showErrorToast(e)
|
||||||
|
return
|
||||||
|
}
|
||||||
val lat = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE)
|
val lat = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE)
|
||||||
val lat_ref = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF)
|
val lat_ref = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF)
|
||||||
val lon = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)
|
val lon = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)
|
||||||
|
|
Loading…
Reference in a new issue