fix #82, properly display MMS images

This commit is contained in:
tibbi 2017-12-18 23:46:42 +01:00
parent 4a91960875
commit 57e1678f1a
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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