Repository: thunderbird/thunderbird-android (language: kotlin)

Issue:
Move `MailTo` and `ListHeaders`
These classes depend on the Android SDK and therefore should not live inside the `:mail:common` Gradle project.

Alternatively, we could change the implementation to not use Android's `Uri` class.


Discussion hints:
nan

Pull request: Move `MailTo` and `ListHeaders` classes
Closes #6014

Test command: ./gradlew :app:core:testDebugUnitTest --tests "com.fsck.k9.helper.MailToTest" --tests "com.fsck.k9.helper.ListHeadersTest" --tests "com.fsck.k9.helper.ReplyToParserTest"

Fix patch:
diff --git a/mail/common/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java b/app/core/src/main/java/com/fsck/k9/helper/ListHeaders.java
similarity index 96%
rename from mail/common/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java
rename to app/core/src/main/java/com/fsck/k9/helper/ListHeaders.java
index 2bed0bafcc4..52f16846078 100644
--- a/mail/common/src/main/java/com/fsck/k9/mail/internet/ListHeaders.java
+++ b/app/core/src/main/java/com/fsck/k9/helper/ListHeaders.java
@@ -1,4 +1,4 @@
-package com.fsck.k9.mail.internet;
+package com.fsck.k9.helper;
 
 
 import android.net.Uri;
@@ -8,7 +8,6 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import com.fsck.k9.helper.MailTo;
 import com.fsck.k9.mail.Address;
 import com.fsck.k9.mail.Message;
 
diff --git a/mail/common/src/main/java/com/fsck/k9/helper/MailTo.java b/app/core/src/main/java/com/fsck/k9/helper/MailTo.java
similarity index 100%
rename from mail/common/src/main/java/com/fsck/k9/helper/MailTo.java
rename to app/core/src/main/java/com/fsck/k9/helper/MailTo.java
diff --git a/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java b/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java
index 7cbb15e714f..2d53a81392d 100644
--- a/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java
+++ b/app/core/src/main/java/com/fsck/k9/helper/ReplyToParser.java
@@ -12,7 +12,6 @@
 import com.fsck.k9.mail.Address;
 import com.fsck.k9.mail.Message;
 import com.fsck.k9.mail.Message.RecipientType;
-import com.fsck.k9.mail.internet.ListHeaders;
 
 
 public class ReplyToParser {


Test patch:
diff --git a/mail/common/src/test/java/com/fsck/k9/mail/internet/ListHeadersTest.java b/app/core/src/test/java/com/fsck/k9/helper/ListHeadersTest.java
similarity index 98%
rename from mail/common/src/test/java/com/fsck/k9/mail/internet/ListHeadersTest.java
rename to app/core/src/test/java/com/fsck/k9/helper/ListHeadersTest.java
index ba6bfbee31b..b3d77e2ca94 100644
--- a/mail/common/src/test/java/com/fsck/k9/mail/internet/ListHeadersTest.java
+++ b/app/core/src/test/java/com/fsck/k9/helper/ListHeadersTest.java
@@ -1,9 +1,10 @@
-package com.fsck.k9.mail.internet;
+package com.fsck.k9.helper;
 
 
 import com.fsck.k9.mail.Address;
 import com.fsck.k9.mail.K9LibRobolectricTestRunner;
 import com.fsck.k9.mail.Message;
+import com.fsck.k9.mail.internet.MimeMessage;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
diff --git a/mail/common/src/test/java/com/fsck/k9/helper/MailToTest.java b/app/core/src/test/java/com/fsck/k9/helper/MailToTest.java
similarity index 100%
rename from mail/common/src/test/java/com/fsck/k9/helper/MailToTest.java
rename to app/core/src/test/java/com/fsck/k9/helper/MailToTest.java
diff --git a/app/core/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java b/app/core/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java
index 501b2731b96..6093ed15fdc 100644
--- a/app/core/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java
+++ b/app/core/src/test/java/com/fsck/k9/helper/ReplyToParserTest.java
@@ -10,7 +10,6 @@
 import com.fsck.k9.mail.Address;
 import com.fsck.k9.mail.Message;
 import com.fsck.k9.mail.Message.RecipientType;
-import com.fsck.k9.mail.internet.ListHeaders;
 import org.junit.Before;
 import org.junit.Test;