mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-16 20:10:37 +01:00
fix #1648, properly handle View intent with no data, launch main screen
This commit is contained in:
parent
518126de3a
commit
c0da2ef6c6
@ -71,6 +71,12 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||
}
|
||||
|
||||
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
|
||||
val uri = mUri.toString()
|
||||
if (uri.startsWith("content:/") && uri.contains("/storage/")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user