am e3cf91af: Set parentServerId for IMAP folders to prevent fixup code from resetting parentKey

* commit 'e3cf91af61fed0b35ef8cbb5790c39a143af7470':
  Set parentServerId for IMAP folders to prevent fixup code from resetting parentKey
This commit is contained in:
Tony Mantler 2013-10-23 15:42:16 -07:00 committed by Android Git Automerger
commit 7a18b83a4f

View File

@ -306,8 +306,9 @@ public class ImapStore extends Store {
final Mailbox mailbox = folder.mMailbox;
int delimiterIdx = mailbox.mServerId.lastIndexOf(mailbox.mDelimiter);
long parentKey = Mailbox.NO_MAILBOX;
String parentPath = null;
if (delimiterIdx != -1) {
String parentPath = path.substring(0, delimiterIdx);
parentPath = path.substring(0, delimiterIdx);
final ImapFolder parentFolder = mailboxes.get(parentPath);
final Mailbox parentMailbox = (parentFolder == null) ? null : parentFolder.mMailbox;
if (parentMailbox != null) {
@ -317,6 +318,7 @@ public class ImapStore extends Store {
}
}
mailbox.mParentKey = parentKey;
mailbox.mParentServerId = parentPath;
}
}