grafully dismiss the Properties dialog at FileNotFound exception
This commit is contained in:
parent
bc0c93ba01
commit
7a5677ea34
2 changed files with 8 additions and 2 deletions
|
@ -7,7 +7,7 @@ buildscript {
|
|||
propMinSdkVersion = 16
|
||||
propTargetSdkVersion = propCompileSdkVersion
|
||||
propVersionCode = 1
|
||||
propVersionName = '3.2.20'
|
||||
propVersionName = '3.3.0'
|
||||
kotlin_version = '1.2.10'
|
||||
support_libs = '27.0.2'
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import com.simplemobiletools.commons.helpers.sumByLong
|
|||
import kotlinx.android.synthetic.main.dialog_properties.view.*
|
||||
import kotlinx.android.synthetic.main.property_item.view.*
|
||||
import java.io.File
|
||||
import java.io.FileNotFoundException
|
||||
import java.util.*
|
||||
|
||||
class PropertiesDialog() {
|
||||
|
@ -93,7 +94,12 @@ class PropertiesDialog() {
|
|||
addProperty(R.string.last_modified, file.lastModified().formatDate())
|
||||
} else {
|
||||
addProperty(R.string.last_modified, "...", R.id.properties_last_modified)
|
||||
addExifProperties(path)
|
||||
try {
|
||||
addExifProperties(path)
|
||||
} catch (e: FileNotFoundException) {
|
||||
activity.toast(R.string.unknown_error_occurred)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
|
|
Loading…
Reference in a new issue