From 57e1678f1a966e9066d67a3728f2e44c2c1e427b Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 18 Dec 2017 23:46:42 +0100 Subject: [PATCH] fix #82, properly display MMS images --- .../simplemobiletools/gallery/activities/PhotoVideoActivity.kt | 2 +- .../com/simplemobiletools/gallery/fragments/PhotoFragment.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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