mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #1648, properly handle View intent with no data, launch main screen
This commit is contained in:
@@ -71,6 +71,12 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun checkIntent(savedInstanceState: Bundle? = null) {
|
private fun checkIntent(savedInstanceState: Bundle? = null) {
|
||||||
|
if (intent.data == null && intent.action == Intent.ACTION_VIEW) {
|
||||||
|
startActivity(Intent(this, MainActivity::class.java))
|
||||||
|
finish()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
mUri = intent.data ?: return
|
mUri = intent.data ?: return
|
||||||
val uri = mUri.toString()
|
val uri = mUri.toString()
|
||||||
if (uri.startsWith("content:/") && uri.contains("/storage/")) {
|
if (uri.startsWith("content:/") && uri.contains("/storage/")) {
|
||||||
|
Reference in New Issue
Block a user