Suppress warning

This commit is contained in:
M66B 2019-11-18 10:29:25 +01:00
parent 283508c441
commit ca1fc37678
1 changed files with 7 additions and 4 deletions

View File

@ -4084,7 +4084,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
for (EntityAttachment attachment : attachments) for (EntityAttachment attachment : attachments)
if (EntityAttachment.PGP_MESSAGE.equals(attachment.encryption)) { if (EntityAttachment.PGP_MESSAGE.equals(attachment.encryption)) {
if (!attachment.available) if (!attachment.available)
throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing)); if (auto)
return null;
else
throw new IllegalArgumentException(context.getString(R.string.title_attachments_missing));
File file = attachment.getFile(context); File file = attachment.getFile(context);
in = new FileInputStream(file); in = new FileInputStream(file);
@ -4115,11 +4118,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
} }
} }
if (in == null) { if (in == null)
if (auto) if (auto)
return null; return null;
throw new IllegalArgumentException(context.getString(R.string.title_not_encrypted)); else
} throw new IllegalArgumentException(context.getString(R.string.title_not_encrypted));
Intent result; Intent result;
File plain = File.createTempFile("plain", "." + message.id, context.getCacheDir()); File plain = File.createTempFile("plain", "." + message.id, context.getCacheDir());