summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Westbrook <pwestbro@google.com>2013-07-29 10:40:14 -0700
committerPaul Westbrook <pwestbro@google.com>2013-07-29 11:21:22 -0700
commit8fe781124116d4d8423c2555c223abd3f056323e (patch)
tree871033fb35309b7ae6ba98edd19b1e8fd978fe6c /src
parent8fded8b7f137c117bbfdb2dbc1849e0429530590 (diff)
downloadandroid_packages_apps_Email-8fe781124116d4d8423c2555c223abd3f056323e.tar.gz
android_packages_apps_Email-8fe781124116d4d8423c2555c223abd3f056323e.tar.bz2
android_packages_apps_Email-8fe781124116d4d8423c2555c223abd3f056323e.zip
Stop crashing with POP attachments
This is the first part of the change to fix POP attachments. A following change will handle these partial messages better Bug: 8651782 Change-Id: I8d00866207dedf63805e0eecab9555c28104f2dc
Diffstat (limited to 'src')
-rw-r--r--src/com/android/email/service/Pop3Service.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/email/service/Pop3Service.java b/src/com/android/email/service/Pop3Service.java
index 57ddf133f..8de7564a4 100644
--- a/src/com/android/email/service/Pop3Service.java
+++ b/src/com/android/email/service/Pop3Service.java
@@ -205,13 +205,16 @@ public class Pop3Service extends Service {
int cnt = unsyncedMessages.size();
// We'll load them from most recent to oldest
for (int i = cnt - 1; i >= 0; i--) {
- Pop3Message message = unsyncedMessages.get(i);
- // TODO: this fetches the entire message at once. This should go back to trying
- // to avoid downloading attachments initially. Specifically, the second argument
- // below used to be Pop3Store.FETCH_BODY_SANE_SUGGESTED_SIZE / 76
- remoteFolder.fetchBody(message, -1, null);
+ final Pop3Message message = unsyncedMessages.get(i);
+ remoteFolder.fetchBody(message, Pop3Store.FETCH_BODY_SANE_SUGGESTED_SIZE / 76,
+ null);
int flag = EmailContent.Message.FLAG_LOADED_COMPLETE;
if (!message.isComplete()) {
+ // TODO: when the message is not complete, this should mark the message as
+ // partial. When that change is made, we need to make sure that:
+ // 1) Partial messages are shown in the conversation list
+ // 2) We are able to download the rest of the message/attachment when the
+ // user requests it.
flag = EmailContent.Message.FLAG_LOADED_UNKNOWN;
}
if (MailActivityEmail.DEBUG) {