feat: Enhance error handling for downloads and memory issues in ImageAttachment and TransportManager
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user