migration: mark parts with content-id and inline as HIDDEN_ATTACHMENT

This commit is contained in:
Vincent Breitmoser 2016-02-03 23:06:36 +01:00
parent a101a15353
commit a2012a1a38

View file

@ -684,8 +684,11 @@ class StoreSchemaDefinition implements LockableDatabase.SchemaDefinition {
Log.d(K9.LOG_TAG, "attachment is in local cache");
}
boolean hasContentTypeAndIsInline = !TextUtils.isEmpty(contentId) && "inline".equalsIgnoreCase(contentDisposition);
int messageType = hasContentTypeAndIsInline ? MessagePartType.HIDDEN_ATTACHMENT : MessagePartType.UNKNOWN;
ContentValues cv = new ContentValues();
cv.put("type", MessagePartType.UNKNOWN);
cv.put("type", messageType);
cv.put("mime_type", mimeType);
cv.put("decoded_body_size", size);
cv.put("display_name", name);