am d37ca267
: Clean up proguard test flags file
* commit 'd37ca267dd24cf628a5c1d92fea535492568e407': Clean up proguard test flags file
This commit is contained in:
commit
36ad0d430c
@ -1,78 +1,22 @@
|
||||
#Email-specific proguard flags, required for tests, that are not covered by UnifiedEmail go here
|
||||
|
||||
-keep class com.android.emailcommon.provider.Account
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public static void actionEditIncomingSettings(android.app.Activity, int, com.android.emailcommon.provider.Account);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public static void actionEditOutgoingSettings(android.app.Activity, int, com.android.emailcommon.provider.Account);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public *** newInstance(com.android.emailcommon.provider.Account, android.content.Context);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class android.content.SharedPreferences$Editor {
|
||||
*** apply();
|
||||
}
|
||||
|
||||
-keep class * extends org.apache.james.mime4j.util.TempStorage
|
||||
|
||||
# Keep names that are used only by unit tests or by animators
|
||||
-keep class ** {
|
||||
*** *ForTest(...);
|
||||
*** *Anim(...);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.internet.Rfc822Output {
|
||||
*** getHtmlBody(java.lang.String);
|
||||
*** buildBodyText(android.content.Context, com.android.emailcommon.provider.EmailContent$Message, boolean);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.mail.Address {
|
||||
<init>(java.lang.String);
|
||||
<init>(java.lang.String,java.lang.String);
|
||||
*** parseAndPack(java.lang.String);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.SecurityPolicy {
|
||||
*** setContext(android.content.Context);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.utility.Utility {
|
||||
*** dumpCursor(android.database.Cursor);
|
||||
*** fromUtf8(byte[]);
|
||||
*** isFirstUtf8Byte(byte);
|
||||
*** replaceBareLfWithCrlf(java.lang.String);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.provider.EmailProvider {
|
||||
*** getReadableDatabase(android.content.Context);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.provider.EmailContent$Attachment {
|
||||
*** createUniqueFile(java.lang.String);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.Preferences {
|
||||
*** getAccountByContentUri(android.net.Uri);
|
||||
}
|
||||
|
||||
-keep class com.android.emailcommon.mail.Message$RecipientType
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.mail.Message {
|
||||
*** setRecipient(com.android.emailcommon.mail.Message$RecipientType, com.android.emailcommon.mail.Address);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.internet.MimeHeader {
|
||||
*** writeToString();
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.internet.MimeMessage {
|
||||
<init>();
|
||||
<init>(java.io.InputStream);
|
||||
*** getExtendedHeader(java.lang.String);
|
||||
*** setExtendedHeader(java.lang.String, java.lang.String);
|
||||
*** getExtendedHeaders();
|
||||
@ -81,26 +25,13 @@
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.internet.MimeUtility {
|
||||
*** foldAndEncode(java.lang.String);
|
||||
*** findPartByContentId(com.android.emailcommon.mail.Part, java.lang.String);
|
||||
*** findFirstPartByMimeType(com.android.emailcommon.mail.Part, java.lang.String);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.mail.transport.SmtpSender {
|
||||
*** setTransport(com.android.email.mail.transport.MailTransport);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.mail.Store {
|
||||
*** requireStructurePrefetch();
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.mail.store.ImapStore {
|
||||
*** setTransport(com.android.email.mail.transport.MailTransport);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.email.mail.store.ImapFolder {
|
||||
*** getMessages(int, int, com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getMessages(com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getMessages(java.lang.String[], com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getUnreadMessageCount();
|
||||
}
|
||||
|
||||
@ -110,22 +41,17 @@
|
||||
|
||||
-keepclasseswithmembers class com.android.email.mail.store.Pop3Store$Pop3Folder {
|
||||
*** getMessages(int, int, com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getMessages(com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getMessages(java.lang.String[], com.android.emailcommon.mail.Folder$MessageRetrievalListener);
|
||||
*** getUnreadMessageCount();
|
||||
*** isOpen();
|
||||
}
|
||||
|
||||
-keep class com.android.emailcommon.mail.Flag
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.mail.Folder {
|
||||
*** getUnreadMessageCount();
|
||||
*** delete(boolean);
|
||||
*** getRole();
|
||||
}
|
||||
|
||||
-keep class com.android.emailcommon.mail.Folder$FolderRole
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.mail.PackedString$Builder {
|
||||
<init>();
|
||||
<init>(java.lang.String);
|
||||
@ -138,33 +64,13 @@
|
||||
*** size();
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.provider.Account {
|
||||
*** getShortcutSafeUri();
|
||||
*** refresh(android.content.Context);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class com.android.emailcommon.provider.Policy {
|
||||
*** setAttachmentFlagsForNewPolicy(android.content.Context,
|
||||
com.android.emailcommon.provider.Account,
|
||||
com.android.emailcommon.provider.Policy);
|
||||
*** clearAccountPolicy(android.content.Context,
|
||||
com.android.emailcommon.provider.Account);
|
||||
}
|
||||
|
||||
-keep class org.apache.james.mime4j.field.Field {
|
||||
-keepclasseswithmembers class org.apache.james.mime4j.field.Field {
|
||||
*** getBody();
|
||||
}
|
||||
|
||||
# The following classes are used only by unit tests.
|
||||
# We should move them into tests/ if possible.
|
||||
|
||||
-keep class org.apache.james.mime4j.message.Message {
|
||||
*;
|
||||
-keepclasseswithmembers class org.apache.james.mime4j.message.Message {
|
||||
<init>(java.io.InputStream);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class org.apache.commons.io.IOUtils {
|
||||
*** toByteArray(java.io.InputStream);
|
||||
*** toByteArray(java.io.Reader);
|
||||
*** toByteArray(java.io.Reader, java.lang.String);
|
||||
*** toByteArray(java.lang.String);
|
||||
}
|
||||
|
@ -308,46 +308,6 @@ public class MimeUtilityTest extends TestCase {
|
||||
|
||||
// TODO: tests for findFirstPartByMimeType(Part part, String mimeType)
|
||||
|
||||
/** Tests for findPartByContentId(Part part, String contentId) */
|
||||
public void testFindPartByContentIdTestCase() throws MessagingException, Exception {
|
||||
final String cid1 = "cid.1@android.com";
|
||||
final Part cid1bp = MessageTestUtils.bodyPart("image/gif", cid1);
|
||||
final String cid2 = "cid.2@android.com";
|
||||
final Part cid2bp = MessageTestUtils.bodyPart("image/gif", "<" + cid2 + ">");
|
||||
|
||||
final Message msg1 = new MessageBuilder()
|
||||
.setBody(new MultipartBuilder("multipart/related")
|
||||
.addBodyPart(MessageTestUtils.bodyPart("text/html", null))
|
||||
.addBodyPart((BodyPart)cid1bp)
|
||||
.build())
|
||||
.build();
|
||||
// found cid1 part
|
||||
final Part actual1_1 = MimeUtility.findPartByContentId(msg1, cid1);
|
||||
assertEquals("could not found expected content-id part", cid1bp, actual1_1);
|
||||
|
||||
final Message msg2 = new MessageBuilder()
|
||||
.setBody(new MultipartBuilder("multipart/mixed")
|
||||
.addBodyPart(MessageTestUtils.bodyPart("image/tiff", "cid.4@android.com"))
|
||||
.addBodyPart(new MultipartBuilder("multipart/related")
|
||||
.addBodyPart(new MultipartBuilder("multipart/alternative")
|
||||
.addBodyPart(MessageTestUtils.bodyPart("text/plain", null))
|
||||
.addBodyPart(MessageTestUtils.bodyPart("text/html", null))
|
||||
.buildBodyPart())
|
||||
.addBodyPart((BodyPart)cid1bp)
|
||||
.buildBodyPart())
|
||||
.addBodyPart(MessageTestUtils.bodyPart("image/gif", "cid.3@android.com"))
|
||||
.addBodyPart((BodyPart)cid2bp)
|
||||
.build())
|
||||
.build();
|
||||
// found cid1 part
|
||||
final Part actual2_1 = MimeUtility.findPartByContentId(msg2, cid1);
|
||||
assertEquals("found part from related multipart", cid1bp, actual2_1);
|
||||
|
||||
// found cid2 part
|
||||
final Part actual2_2 = MimeUtility.findPartByContentId(msg2, cid2);
|
||||
assertEquals("found part from mixed multipart", cid2bp, actual2_2);
|
||||
}
|
||||
|
||||
/** Tests for findPartByContentId(Part part, String contentId) */
|
||||
public void brokentestCollectParts() throws MessagingException, Exception {
|
||||
// golden cases; these will marked as attachments
|
||||
|
Loading…
Reference in New Issue
Block a user