From 0e2dd357d1164d4261b71eea277e8f873c4739f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 12 Jul 2023 12:15:30 +0200 Subject: [PATCH] Fix export for LOCKED property for SMS --- .../simplemobiletools/smsmessenger/helpers/MessagesReader.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt index 175ad735..bc26837c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/helpers/MessagesReader.kt @@ -40,7 +40,7 @@ class MessagesReader(private val context: Context) { val body = cursor.getStringValueOrNull(Sms.BODY) val date = cursor.getLongValue(Sms.DATE) val dateSent = cursor.getLongValue(Sms.DATE_SENT) - val locked = cursor.getIntValue(Sms.DATE_SENT) + val locked = cursor.getIntValue(Sms.LOCKED) val protocol = cursor.getStringValueOrNull(Sms.PROTOCOL) val read = cursor.getIntValue(Sms.READ) val status = cursor.getIntValue(Sms.STATUS) @@ -172,6 +172,7 @@ class MessagesReader(private val context: Context) { stream.readBytes().toString(Charsets.UTF_8) } } + else -> { usePart(partId) { stream -> Base64.encodeToString(stream.readBytes(), Base64.DEFAULT)