mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 01:21:11 +01:00
Report message not encrypted
This commit is contained in:
@@ -948,9 +948,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
DB db = DB.getInstance(context);
|
||||
|
||||
// Find encrypted data
|
||||
boolean found = false;
|
||||
List<EntityAttachment> attachments = db.attachment().getAttachments(id);
|
||||
for (EntityAttachment attachment : attachments)
|
||||
if (attachment.available && "encrypted.asc".equals(attachment.name)) {
|
||||
found = true;
|
||||
|
||||
// Serialize encrypted data
|
||||
FileInputStream encrypted = new FileInputStream(EntityAttachment.getFile(context, attachment.id));
|
||||
ByteArrayOutputStream decrypted = new ByteArrayOutputStream();
|
||||
@@ -1008,6 +1011,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
throw new IllegalArgumentException(getString(R.string.title_not_encrypted));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user