Merge "Prevent simultaneous imap and pop syncs" into jb-ub-mail-ur10

This commit is contained in:
Martin Hibdon 2013-08-28 22:30:32 +00:00 committed by Android (Google) Code Review
commit 037e4ad330
2 changed files with 4 additions and 4 deletions

View File

@ -172,7 +172,7 @@ public class ImapService extends Service {
nc.cancelLoginFailedNotification(account.mId);
} catch (MessagingException e) {
if (Logging.LOGD) {
LogUtils.v(Logging.LOG_TAG, "synchronizeMailboxSynchronous", e);
LogUtils.d(Logging.LOG_TAG, "synchronizeMailboxSynchronous", e);
}
if (e instanceof AuthenticationFailedException) {
// Generate authentication notification
@ -342,11 +342,11 @@ public class ImapService extends Service {
* @return results of the sync pass
* @throws MessagingException
*/
private static void synchronizeMailboxGeneric(final Context context, final Account account,
private synchronized static void synchronizeMailboxGeneric(final Context context, final Account account,
final Mailbox mailbox, final boolean loadMore, final boolean uiRefresh)
throws MessagingException {
LogUtils.v(Logging.LOG_TAG, "synchronizeMailboxGeneric " + account + " " + mailbox + " "
LogUtils.d(Logging.LOG_TAG, "synchronizeMailboxGeneric " + account + " " + mailbox + " "
+ loadMore + " " + uiRefresh);
final ArrayList<Long> unseenMessages = new ArrayList<Long>();

View File

@ -233,7 +233,7 @@ public class Pop3Service extends Service {
* @param deltaMessageCount the requested change to number of messages to sync
* @throws MessagingException
*/
private static void synchronizePop3Mailbox(final Context context, final Account account,
private synchronized static void synchronizePop3Mailbox(final Context context, final Account account,
final Mailbox mailbox, final int deltaMessageCount) throws MessagingException {
// TODO Break this into smaller pieces
ContentResolver resolver = context.getContentResolver();