1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 05:02:26 -05:00

Make MessageReference fields private

This commit is contained in:
cketti 2015-04-03 20:43:49 +02:00
parent 9275bb2943
commit a3375d7030
3 changed files with 14 additions and 14 deletions

View File

@ -36,27 +36,27 @@ public class MessageReferenceTest {
public void parseIdentityStringWithoutFlag() throws MessagingException { public void parseIdentityStringWithoutFlag() throws MessagingException {
MessageReference messageReference = new MessageReference("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA="); MessageReference messageReference = new MessageReference("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=");
assertEquals("o hai!", messageReference.accountUuid); assertEquals("o hai!", messageReference.getAccountUuid());
assertEquals("folder", messageReference.folderName); assertEquals("folder", messageReference.getFolderName());
assertEquals("10101010", messageReference.uid); assertEquals("10101010", messageReference.getUid());
assertNull(messageReference.flag); assertNull(messageReference.getFlag());
} }
@Test @Test
public void parseIdentityStringWithFlag() throws MessagingException { public void parseIdentityStringWithFlag() throws MessagingException {
MessageReference messageReference = new MessageReference("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=:ANSWERED"); MessageReference messageReference = new MessageReference("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=:ANSWERED");
assertEquals("o hai!", messageReference.accountUuid); assertEquals("o hai!", messageReference.getAccountUuid());
assertEquals("folder", messageReference.folderName); assertEquals("folder", messageReference.getFolderName());
assertEquals("10101010", messageReference.uid); assertEquals("10101010", messageReference.getUid());
assertEquals(Flag.ANSWERED, messageReference.flag); assertEquals(Flag.ANSWERED, messageReference.getFlag());
} }
@Test @Test
public void parseIdentityStringContainingBadVersionNumber() throws MessagingException { public void parseIdentityStringContainingBadVersionNumber() throws MessagingException {
MessageReference messageReference = new MessageReference("@:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=:ANSWERED"); MessageReference messageReference = new MessageReference("@:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=:ANSWERED");
assertNull(messageReference.accountUuid); assertNull(messageReference.getAccountUuid());
} }
@Test(expected = MessagingException.class) @Test(expected = MessagingException.class)

View File

@ -2942,7 +2942,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
@Override @Override
public void loadMessageForViewFinished(Account account, String folder, String uid, LocalMessage message) { public void loadMessageForViewFinished(Account account, String folder, String uid, LocalMessage message) {
if ((mMessageReference == null) || !mMessageReference.uid.equals(uid)) { if ((mMessageReference == null) || !mMessageReference.getUid().equals(uid)) {
return; return;
} }

View File

@ -17,10 +17,10 @@ import com.fsck.k9.mail.filter.Base64;
import java.util.StringTokenizer; import java.util.StringTokenizer;
public class MessageReference implements Parcelable { public class MessageReference implements Parcelable {
protected final String accountUuid; private final String accountUuid;
protected final String folderName; private final String folderName;
protected final String uid; private final String uid;
protected final Flag flag; private final Flag flag;
/** /**