Add some local timings to backup export.

This commit is contained in:
Greyson Parrelli
2024-10-10 10:55:27 -04:00
parent 0712503485
commit 497cec4c17
5 changed files with 91 additions and 38 deletions

View File

@@ -598,7 +598,12 @@ class AttachmentTable(
val iv = cursor.requireBlob(REMOTE_IV) ?: Util.getSecretBytes(16)
val digest = run {
val fileInfo = getDataFileInfo(attachmentId)!!
calculateDigest(fileInfo, key, iv)
try {
calculateDigest(fileInfo, key, iv)
} catch (e: FileNotFoundException) {
Log.w(TAG, "[createKeyIvDigestForAttachmentsThatNeedArchiveUpload][$attachmentId] Could not find file ${fileInfo.file}. Delete all later?")
return@forEach
}
}
writableDatabase.update(TABLE_NAME)

View File

@@ -133,7 +133,7 @@ class GroupReceiptTable(context: Context?, databaseHelper: SignalDatabase?) : Da
.readToList { it.toGroupReceiptInfo() }
}
fun getGroupReceiptInfoForMessages(ids: Set<Long>): Map<Long, List<GroupReceiptInfo>> {
fun getGroupReceiptInfoForMessages(ids: Collection<Long>): Map<Long, List<GroupReceiptInfo>> {
if (ids.isEmpty()) {
return emptyMap()
}