mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
catch exceptions thrown at trying to show the image on a map
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user