mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
This commit is contained in:
parent
3804be49e3
commit
ae031af161
1 changed files with 6 additions and 4 deletions
|
@ -77,12 +77,14 @@ open class PhotoVideoActivity : SimpleActivity(), ViewPagerFragment.FragmentList
|
||||||
val uri = mUri.toString()
|
val uri = mUri.toString()
|
||||||
if (uri.startsWith("content:/") && uri.contains("/storage/")) {
|
if (uri.startsWith("content:/") && uri.contains("/storage/")) {
|
||||||
val guessedPath = uri.substring(uri.indexOf("/storage/"))
|
val guessedPath = uri.substring(uri.indexOf("/storage/"))
|
||||||
|
if (File(guessedPath).exists()) {
|
||||||
val extras = intent.extras ?: Bundle()
|
val extras = intent.extras ?: Bundle()
|
||||||
extras.apply {
|
extras.apply {
|
||||||
putString(REAL_FILE_PATH, guessedPath)
|
putString(REAL_FILE_PATH, guessedPath)
|
||||||
intent.putExtras(this)
|
intent.putExtras(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var filename = getFilenameFromUri(mUri!!)
|
var filename = getFilenameFromUri(mUri!!)
|
||||||
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
mIsFromGallery = intent.getBooleanExtra(IS_FROM_GALLERY, false)
|
||||||
|
|
Loading…
Reference in a new issue