fix displaying fullscreen images containing percentage sign or hashtag

This commit is contained in:
tibbi 2018-09-20 14:15:12 +02:00
parent f95da6b83a
commit fe69c09915
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,8 @@ class PicassoRegionDecoder : ImageRegionDecoder {
private val decoderLock = Any()
override fun init(context: Context, uri: Uri): Point {
val inputStream = context.contentResolver.openInputStream(uri)
val newUri = Uri.parse(uri.toString().replace("%", "%25").replace("#", "%23"))
val inputStream = context.contentResolver.openInputStream(newUri)
decoder = BitmapRegionDecoder.newInstance(inputStream, false)
return Point(decoder!!.width, decoder!!.height)
}