ignore REAL_FILE_PATH on OTG files

This commit is contained in:
tibbi 2018-04-24 17:54:11 +02:00
parent bab2b4e5a0
commit 0148465e75
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
if (intent.extras?.containsKey(REAL_FILE_PATH) == true) {
val realPath = intent.extras.getString(REAL_FILE_PATH)
uri = when {
realPath.startsWith(OTG_PATH) -> Uri.parse(realPath)
realPath.startsWith(OTG_PATH) -> uri
realPath.startsWith("file:/") -> Uri.parse(realPath)
else -> Uri.fromFile(File(realPath))
}