feat: Enhance error handling for downloads and memory issues in ImageAttachment and TransportManager

This commit is contained in:
2026-02-25 19:43:07 +05:00
parent c1f9114251
commit a5fb90e072
4 changed files with 151 additions and 62 deletions

View File

@@ -573,6 +573,9 @@ object MessageCrypto {
decryptWithPBKDF2Key(encryptedData, pbkdf2Key)
} catch (_: Exception) {
null
} catch (_: OutOfMemoryError) {
System.gc()
null
}
}
@@ -607,6 +610,9 @@ object MessageCrypto {
result
} catch (e: Exception) {
null
} catch (_: OutOfMemoryError) {
System.gc()
null
}
}
@@ -629,6 +635,9 @@ object MessageCrypto {
decryptAttachmentBlobWithPlainKey(encryptedData, keyAndNonce)
} catch (e: Exception) {
null
} catch (_: OutOfMemoryError) {
System.gc()
null
}
}
@@ -763,6 +772,9 @@ object MessageCrypto {
result
} catch (e: Exception) {
null
} catch (_: OutOfMemoryError) {
System.gc()
null
}
}