diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/migrations/MigrationTo51.java b/k9mail/src/main/java/com/fsck/k9/mailstore/migrations/MigrationTo51.java index 3fe6d1fb2..fa950158b 100644 --- a/k9mail/src/main/java/com/fsck/k9/mailstore/migrations/MigrationTo51.java +++ b/k9mail/src/main/java/com/fsck/k9/mailstore/migrations/MigrationTo51.java @@ -7,8 +7,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import android.content.ContentValues; import android.database.Cursor; @@ -18,10 +16,8 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; import android.text.TextUtils; -import timber.log.Timber; import com.fsck.k9.Account; -import com.fsck.k9.K9; import com.fsck.k9.helper.Utility; import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.internet.MimeHeader; @@ -29,6 +25,7 @@ import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mailstore.StorageManager; import org.apache.james.mime4j.codec.QuotedPrintableOutputStream; import org.apache.james.mime4j.util.MimeUtil; +import timber.log.Timber; class MigrationTo51 { @@ -392,7 +389,7 @@ class MigrationTo51 { String contentId = cursor.getString(1); // this is not super efficient, but occurs only once or twice - htmlContent = htmlContent.replaceAll(Pattern.quote(contentUriString), Matcher.quoteReplacement("cid:" + contentId)); + htmlContent = htmlContent.replace(contentUriString, "cid:" + contentId); } } finally { cursor.close();