From 4f4918c39b9360b888b908f585fb7385beea42aa Mon Sep 17 00:00:00 2001 From: cketti Date: Sun, 1 Jul 2018 02:09:34 +0200 Subject: [PATCH] Move MessageCryptoAnnotations to a different package --- .../main/java/com/fsck/k9/activity/MessageLoaderHelper.java | 2 +- .../com/fsck/k9/crypto/MessageCryptoStructureDetector.java | 2 +- .../k9/{ui/crypto => mailstore}/MessageCryptoAnnotations.java | 3 +-- .../java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java | 1 - .../main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java | 2 ++ .../main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java | 2 +- .../com/fsck/k9/ui/message/LocalMessageExtractorLoader.java | 2 +- .../com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java | 2 +- .../com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java | 1 - .../java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java | 1 + 10 files changed, 9 insertions(+), 9 deletions(-) rename app/core/src/main/java/com/fsck/k9/{ui/crypto => mailstore}/MessageCryptoAnnotations.java (91%) diff --git a/app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java b/app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java index 1ef4315ab..8863530f5 100644 --- a/app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java +++ b/app/core/src/main/java/com/fsck/k9/activity/MessageLoaderHelper.java @@ -26,7 +26,7 @@ import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mailstore.LocalMessage; import com.fsck.k9.mailstore.MessageViewInfo; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; import com.fsck.k9.ui.crypto.MessageCryptoCallback; import com.fsck.k9.ui.crypto.MessageCryptoHelper; import com.fsck.k9.ui.crypto.OpenPgpApiFactory; diff --git a/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java b/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java index af7cbb32f..2778a3d5f 100644 --- a/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java +++ b/app/core/src/main/java/com/fsck/k9/crypto/MessageCryptoStructureDetector.java @@ -21,7 +21,7 @@ import com.fsck.k9.mail.internet.MimeBodyPart; import com.fsck.k9.mail.internet.MimeMultipart; import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mailstore.CryptoResultAnnotation; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; import static com.fsck.k9.mail.internet.MimeUtility.isSameMimeType; diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoAnnotations.java b/app/core/src/main/java/com/fsck/k9/mailstore/MessageCryptoAnnotations.java similarity index 91% rename from app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoAnnotations.java rename to app/core/src/main/java/com/fsck/k9/mailstore/MessageCryptoAnnotations.java index 7adf91ad1..029233995 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoAnnotations.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/MessageCryptoAnnotations.java @@ -1,10 +1,9 @@ -package com.fsck.k9.ui.crypto; +package com.fsck.k9.mailstore; import java.util.HashMap; import com.fsck.k9.mail.Part; -import com.fsck.k9.mailstore.CryptoResultAnnotation; public class MessageCryptoAnnotations { diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java b/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java index f22bb2393..eac67733e 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java +++ b/app/core/src/main/java/com/fsck/k9/mailstore/MessageViewInfoExtractor.java @@ -27,7 +27,6 @@ import com.fsck.k9.mailstore.util.FlowedMessageUtils; import com.fsck.k9.message.extractors.AttachmentInfoExtractor; import com.fsck.k9.message.html.HtmlConverter; import com.fsck.k9.message.html.HtmlProcessor; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; import org.openintents.openpgp.util.OpenPgpUtils; import timber.log.Timber; diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java b/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java index 627030666..ce54ed38e 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java +++ b/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoCallback.java @@ -4,6 +4,8 @@ package com.fsck.k9.ui.crypto; import android.content.Intent; import android.content.IntentSender; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; + public interface MessageCryptoCallback { void onCryptoHelperProgress(int current, int max); diff --git a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java b/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java index 7059f602a..4586121f3 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java +++ b/app/core/src/main/java/com/fsck/k9/ui/crypto/MessageCryptoHelper.java @@ -17,7 +17,6 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.WorkerThread; -import com.fsck.k9.K9; import com.fsck.k9.autocrypt.AutocryptOperations; import com.fsck.k9.crypto.MessageCryptoStructureDetector; import com.fsck.k9.mail.Address; @@ -35,6 +34,7 @@ import com.fsck.k9.mail.internet.SizeAware; import com.fsck.k9.mail.internet.TextBody; import com.fsck.k9.mailstore.CryptoResultAnnotation; import com.fsck.k9.mailstore.CryptoResultAnnotation.CryptoError; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; import com.fsck.k9.mailstore.MessageHelper; import com.fsck.k9.mailstore.MimePartStreamParser; import com.fsck.k9.mailstore.util.FileFactory; diff --git a/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java b/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java index 5050f81a3..9def35609 100644 --- a/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java +++ b/app/core/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java @@ -12,7 +12,7 @@ import timber.log.Timber; import com.fsck.k9.mailstore.LocalMessage; import com.fsck.k9.mailstore.MessageViewInfoExtractor; import com.fsck.k9.mailstore.MessageViewInfo; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; public class LocalMessageExtractorLoader extends AsyncTaskLoader { diff --git a/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java b/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java index 0b0367a92..1c28b017b 100644 --- a/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java +++ b/app/core/src/test/java/com/fsck/k9/crypto/MessageCryptoStructureDetectorTest.java @@ -11,7 +11,7 @@ import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.MimeMessage; import com.fsck.k9.mail.internet.MimeMessageHelper; import com.fsck.k9.mail.internet.TextBody; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; import org.junit.Test; import static com.fsck.k9.message.TestMessageConstructionUtils.bodypart; diff --git a/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java b/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java index 0d5ffbc73..da2a9388f 100644 --- a/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java +++ b/app/core/src/test/java/com/fsck/k9/mailstore/MessageViewInfoExtractorTest.java @@ -33,7 +33,6 @@ import com.fsck.k9.mailstore.CryptoResultAnnotation.CryptoError; import com.fsck.k9.mailstore.MessageViewInfoExtractor.ViewableExtractedText; import com.fsck.k9.message.extractors.AttachmentInfoExtractor; import com.fsck.k9.message.html.HtmlProcessor; -import com.fsck.k9.ui.crypto.MessageCryptoAnnotations; import org.junit.Before; import org.junit.Test; import org.mockito.invocation.InvocationOnMock; diff --git a/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java b/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java index bb1f4b6ba..6420f8b7b 100644 --- a/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java +++ b/app/core/src/test/java/com/fsck/k9/ui/crypto/MessageCryptoHelperTest.java @@ -19,6 +19,7 @@ import com.fsck.k9.mail.internet.MimeMessage; import com.fsck.k9.mail.internet.TextBody; import com.fsck.k9.mailstore.CryptoResultAnnotation; import com.fsck.k9.mailstore.CryptoResultAnnotation.CryptoError; +import com.fsck.k9.mailstore.MessageCryptoAnnotations; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor;