AttachmentBundle bundle = mMsgInfo.getAttachmentBundle();
List attachmentList = bundle.getAttachmentsAndTextPart();
for (int i = 0; i < attachmentList.size(); i++) {
Object o = attachmentList.get(i);
if (o instanceof CryptoAttachment) {
CryptoAttachment ca = (CryptoAttachment) o;
if (! ca.decryptedSuccessfully()) {
// FIXME
EncryptionUtils cryptoUtils = getEncryptionUtils();
BodyPart bp = ca.decryptAttachment(cryptoUtils, key);
MailUtilities.handlePart((MimeBodyPart) bp, bundle);
}
}
}