fix #1648, properly handle View intent with no data, launch main screen
This commit is contained in:
parent
518126de3a
commit
c0da2ef6c6
1 changed files with 6 additions and 0 deletions
|
@ -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…
Reference in a new issue