diff --git a/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java b/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java index f6fb010e8..267e58acf 100644 --- a/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java +++ b/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java @@ -203,9 +203,14 @@ public class MessageProvider extends ContentProvider { @Override public String getField(final MessageInfoHolder source) { final LocalMessage message = source.message; - return CONTENT_URI + "/delete_message/" - + message.getAccount().getAccountNumber() + "/" - + message.getFolder().getName() + "/" + message.getUid(); + int accountNumber = message.getAccount().getAccountNumber(); + return CONTENT_URI.buildUpon() + .appendPath("delete_message") + .appendPath(Integer.toString(accountNumber)) + .appendPath(message.getFolder().getName()) + .appendPath(message.getUid()) + .build() + .toString(); } } public static class SenderExtractor implements FieldExtractor {