From 6caccc4ead65e8bb52a5070b24d0ab7efd6fad4e Mon Sep 17 00:00:00 2001 From: Bao-Long Nguyen-Trong Date: Mon, 11 May 2009 23:31:59 +0000 Subject: [PATCH] . Rolled back some code from r505 that are not usefull. The code that really prevents the double message in POP3 is when we set the X_DOWNLOADED_FULL in the POP3 folder class --- .../android/email/MessagingController.java | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/src/com/android/email/MessagingController.java b/src/com/android/email/MessagingController.java index 5bdf744b1..3306ab77c 100644 --- a/src/com/android/email/MessagingController.java +++ b/src/com/android/email/MessagingController.java @@ -933,41 +933,7 @@ s * critical data as fast as possible, and then we'll fill in the de ArrayList largeMessages = new ArrayList(); ArrayList smallMessages = new ArrayList(); for (Message message : unsyncedMessages) { - /* - * Some (POP3) servers only support full message download - * and not header/partial so messages may already be downloaded - */ - if (message.isSet(Flag.X_DOWNLOADED_FULL)) { - try { - // Store the updated message locally - localFolder.appendMessages(new Message[]{ - message - }); - - Message localMessage = localFolder.getMessage(message.getUid()); - - // Set a flag indicating this message has now be fully downloaded - localMessage.setFlag(Flag.X_DOWNLOADED_FULL, true); - if (isMessageSuppressed(account, folder, localMessage) == false) { - // Update the listener with what we've found - for (MessagingListener l : getListeners()) { - l.synchronizeMailboxNewMessage( - account, - folder, - localMessage); - } - } - } catch (MessagingException me) { - addErrorMessage(account, me); - } - } - /* - * Sort the messages into two buckets, small and large. Small messages will be - * downloaded fully and large messages will be downloaded in parts. By sorting - * into two buckets we can pipeline the commands for each set of messages - * into a single command to the server saving lots of round trips. - */ - else if (message.getSize() > (MAX_SMALL_MESSAGE_SIZE)) { + if (message.getSize() > (MAX_SMALL_MESSAGE_SIZE)) { largeMessages.add(message); } else { smallMessages.add(message);