1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Set the IMAP namespace for Gmail during auto-configuration.

This commit is contained in:
Andrew Chen 2011-11-14 15:41:37 -08:00
parent 44cc1930d5
commit 58d20a501a

View File

@ -193,9 +193,16 @@ public class AccountSetupBasics extends K9Activity
incomingUsername = incomingUsername.replaceAll("\\$domain", domain);
URI incomingUriTemplate = mProvider.incomingUriTemplate;
String namespace = null;
// Gmail uses a special namespace, otherwise everything ends up in the "[Imap]" namespace.
if(incomingUriTemplate.getHost().toLowerCase().endsWith("gmail.com")) {
namespace = "/[Gmail]";
}
incomingUri = new URI(incomingUriTemplate.getScheme(), incomingUsername + ":"
+ passwordEnc, incomingUriTemplate.getHost(), incomingUriTemplate.getPort(), null,
null, null);
+ passwordEnc, incomingUriTemplate.getHost(), incomingUriTemplate.getPort(),
namespace, null, null);
String outgoingUsername = mProvider.outgoingUsernameTemplate;