Glide: try to handle encrypted image. [WIP]

This commit is contained in:
ganfra
2019-06-28 19:31:32 +02:00
committed by Benoit Marty
parent b54ca5a8a0
commit 164c8dab09
3 changed files with 59 additions and 46 deletions

View File

@ -166,15 +166,6 @@ object MXEncryptedAttachments {
return null
}
// detect if there is no data to decrypt
try {
if (0 == attachmentStream.available()) {
return ByteArrayInputStream(ByteArray(0))
}
} catch (e: Exception) {
Timber.e(e, "Fail to retrieve the file size")
}
val t0 = System.currentTimeMillis()
val outStream = ByteArrayOutputStream()