mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-03 15:58:40 +00:00
Add LeakCanary to flipper builds.
This commit is contained in:
@@ -8,7 +8,9 @@ import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
|
||||
import okio.HashingSink
|
||||
import okio.Okio
|
||||
import okio.blackholeSink
|
||||
import okio.buffer
|
||||
import okio.source
|
||||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.crypto.AttachmentSecretProvider
|
||||
import org.thoughtcrime.securesms.crypto.ModernDecryptingPartInputStream
|
||||
@@ -97,11 +99,11 @@ object EmojiFiles {
|
||||
val file = version.getFile(context, uuid)
|
||||
|
||||
try {
|
||||
HashingSink.md5(Okio.blackhole()).use { hashingSink ->
|
||||
Okio.buffer(Okio.source(getInputStream(context, file))).use { source ->
|
||||
HashingSink.md5(blackholeSink()).use { hashingSink ->
|
||||
getInputStream(context, file).source().buffer().use { source ->
|
||||
source.readAll(hashingSink)
|
||||
|
||||
return hashingSink.hash().toByteArray()
|
||||
return hashingSink.hash.toByteArray()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in New Issue
Block a user