mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
catch and show exceptions thrown at fetching path of MediaActivity
This commit is contained in:
@@ -81,7 +81,14 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
media_refresh_layout.setOnRefreshListener { getMedia() }
|
media_refresh_layout.setOnRefreshListener { getMedia() }
|
||||||
mPath = intent.getStringExtra(DIRECTORY)
|
try {
|
||||||
|
mPath = intent.getStringExtra(DIRECTORY)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
showErrorToast(e)
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
storeStateVariables()
|
storeStateVariables()
|
||||||
if (mShowAll)
|
if (mShowAll)
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
supportActionBar?.setDisplayHomeAsUpEnabled(false)
|
||||||
|
Reference in New Issue
Block a user