mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-18 06:17:59 +01:00
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) {
|
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/")) {
|
||||||
|
|
Loading…
Reference in a new issue