MCPcopy Create free account
hub / github.com/M66B/FairEmail / onDownload

Method onDownload

app/src/main/java/eu/faircode/email/Core.java:3306–3313  ·  view source on GitHub ↗
(Context context, JSONArray jargs, EntityAccount account, EntityFolder folder, EntityMessage message, IMAPStore istore, IMAPFolder ifolder, State state)

Source from the content-addressed store, hash-verified

3304 }
3305
3306 private static void onDownload(Context context, JSONArray jargs, EntityAccount account, EntityFolder folder, EntityMessage message, IMAPStore istore, IMAPFolder ifolder, State state) throws MessagingException, IOException, JSONException {
3307 long uid = jargs.getLong(0);
3308 if (!Objects.equals(uid, message.uid))
3309 throw new IllegalArgumentException("Different uid=" + uid + "/" + message.uid);
3310
3311 MimeMessage imessage = (MimeMessage) ifolder.getMessageByUID(uid);
3312 downloadMessage(context, account, folder, istore, ifolder, imessage, message.id, state, new SyncStats());
3313 }
3314
3315 private static void onSubject(Context context, JSONArray jargs, EntityAccount account, EntityFolder folder, EntityMessage message, IMAPStore istore, IMAPFolder ifolder, State state) throws JSONException, MessagingException, IOException {
3316 DB db = DB.getInstance(context);

Callers 1

processOperationsMethod · 0.95

Calls 4

downloadMessageMethod · 0.95
getLongMethod · 0.80
getMessageByUIDMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected