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