diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt index de41a30a8..278fc7701 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/PhotoVideoActivity.kt @@ -67,7 +67,7 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList return } else { val path = applicationContext.getRealPathFromURI(mUri!!) ?: "" - if (path != mUri.toString() && path.isNotEmpty()) { + if (path != mUri.toString() && path.isNotEmpty() && mUri!!.authority != "mms") { scanPath(mUri!!.path) sendViewPagerIntent(path) finish() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt index a9af4d393..6c3093f46 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/PhotoFragment.kt @@ -55,7 +55,7 @@ class PhotoFragment : ViewPagerFragment() { } medium = arguments!!.getSerializable(MEDIUM) as Medium - if (medium.path.startsWith("content://")) { + if (medium.path.startsWith("content://") && !medium.path.startsWith("content://mms/")) { val originalPath = medium.path medium.path = context!!.getRealPathFromURI(Uri.parse(originalPath)) ?: medium.path