mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-02 00:25:10 -04:00
Code cleanup: Fixed some warnings
This commit is contained in:
parent
4290b74e86
commit
683f31e32e
@ -83,12 +83,14 @@ public class MessagingControllerPushReceiver implements PushReceiver
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
controller.synchronizeMailbox(account, folder.getName(), new MessagingListener()
|
||||
{
|
||||
@Override
|
||||
public void synchronizeMailboxFinished(Account account, String folder,
|
||||
int totalMessagesInMailbox, int numNewMessages)
|
||||
{
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void synchronizeMailboxFailed(Account account, String folder,
|
||||
String message)
|
||||
{
|
||||
|
@ -36,8 +36,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -8,6 +8,7 @@ public class MessageReference implements Serializable
|
||||
public String folderName;
|
||||
public String uid;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (o instanceof MessageReference == false)
|
||||
@ -23,6 +24,20 @@ public class MessageReference implements Serializable
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int MULTIPLIER = 31;
|
||||
|
||||
int result = 1;
|
||||
result = MULTIPLIER * result + ((accountUuid == null) ? 0 : accountUuid.hashCode());
|
||||
result = MULTIPLIER * result + ((folderName == null) ? 0 : folderName.hashCode());
|
||||
result = MULTIPLIER * result + ((uid == null) ? 0 : uid.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "MessageReference{accountUuid = '" +
|
||||
|
@ -23,6 +23,7 @@ public abstract class Message implements Part, Body
|
||||
|
||||
protected Folder mFolder;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (o == null || o instanceof Message == false)
|
||||
@ -35,6 +36,17 @@ public abstract class Message implements Part, Body
|
||||
&& mUid.equals(other.getUid()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
final int MULTIPLIER = 31;
|
||||
|
||||
int result = 1;
|
||||
result = MULTIPLIER * result + mFolder.getName().hashCode();
|
||||
result = MULTIPLIER * result + mFolder.getAccount().getUuid().hashCode();
|
||||
result = MULTIPLIER * result + mUid.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getUid()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user