Loading src/com/fsck/k9/mail/Store.java +17 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,11 @@ public abstract class Store { * @see Account#getStoreUri() */ public static class StoreSettings { /** * Name of the store type (e.g. "IMAP"). */ public final String type; /** * The host name of the incoming server. */ Loading Loading @@ -162,6 +167,8 @@ public abstract class Store { /** * Creates a new {@code StoreSettings} object. * * @param type * see {@link StoreSettings#type} * @param host * see {@link StoreSettings#host} * @param port Loading @@ -175,8 +182,10 @@ public abstract class Store { * @param password * see {@link StoreSettings#password} */ public StoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password) { public StoreSettings(String type, String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password) { this.type = type; this.host = host; this.port = port; this.connectionSecurity = connectionSecurity; Loading @@ -193,6 +202,12 @@ public abstract class Store { public Map<String, String> getExtra() { return null; } protected void putIfNotNull(Map<String, String> map, String key, String value) { if (value != null) { map.put(key, value); } } } Loading src/com/fsck/k9/mail/store/ImapStore.java +5 −3 Original line number Diff line number Diff line Loading @@ -223,20 +223,22 @@ public class ImapStore extends Store { * @see ImapStore#decodeUri(String) */ private static class ImapStoreSettings extends StoreSettings { private static final String PATH_PREFIX_KEY = "path_prefix"; private static final String STORE_TYPE = "IMAP"; private static final String PATH_PREFIX_KEY = "pathPrefix"; public final String pathPrefix; protected ImapStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password, String pathPrefix) { super(host, port, connectionSecurity, authenticationType, username, password); super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, password); this.pathPrefix = pathPrefix; } @Override public Map<String, String> getExtra() { Map<String, String> extra = new HashMap<String, String>(); extra.put(PATH_PREFIX_KEY, pathPrefix); putIfNotNull(extra, PATH_PREFIX_KEY, pathPrefix); return extra; } } Loading src/com/fsck/k9/mail/store/Pop3Store.java +4 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ import java.util.HashSet; import java.util.List; public class Pop3Store extends Store { private static final String STORE_TYPE = "POP3"; public static final int CONNECTION_SECURITY_NONE = 0; public static final int CONNECTION_SECURITY_TLS_OPTIONAL = 1; public static final int CONNECTION_SECURITY_TLS_REQUIRED = 2; Loading Loading @@ -99,7 +101,8 @@ public class Pop3Store extends Store { } } return new StoreSettings(host, port, connectionSecurity, null, username, password); return new StoreSettings(STORE_TYPE, host, port, connectionSecurity, null, username, password); } Loading src/com/fsck/k9/mail/store/WebDavStore.java +7 −5 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ public class WebDavStore extends Store { * @see WebDavStore#decodeUri(String) */ private static class WebDavStoreSettings extends StoreSettings { private static final String STORE_TYPE = "WebDAV"; private static final String ALIAS_KEY = "alias"; private static final String PATH_KEY = "path"; private static final String AUTH_PATH_KEY = "authPath"; Loading @@ -204,7 +205,8 @@ public class WebDavStore extends Store { protected WebDavStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password, String alias, String path, String authPath, String mailboxPath) { super(host, port, connectionSecurity, authenticationType, username, password); super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, password); this.alias = alias; this.path = path; this.authPath = authPath; Loading @@ -214,10 +216,10 @@ public class WebDavStore extends Store { @Override public Map<String, String> getExtra() { Map<String, String> extra = new HashMap<String, String>(); extra.put(ALIAS_KEY, alias); extra.put(PATH_KEY, path); extra.put(AUTH_PATH_KEY, authPath); extra.put(MAILBOX_PATH_KEY, mailboxPath); putIfNotNull(extra, ALIAS_KEY, alias); putIfNotNull(extra, PATH_KEY, path); putIfNotNull(extra, AUTH_PATH_KEY, authPath); putIfNotNull(extra, MAILBOX_PATH_KEY, mailboxPath); return extra; } } Loading Loading
src/com/fsck/k9/mail/Store.java +17 −2 Original line number Diff line number Diff line Loading @@ -120,6 +120,11 @@ public abstract class Store { * @see Account#getStoreUri() */ public static class StoreSettings { /** * Name of the store type (e.g. "IMAP"). */ public final String type; /** * The host name of the incoming server. */ Loading Loading @@ -162,6 +167,8 @@ public abstract class Store { /** * Creates a new {@code StoreSettings} object. * * @param type * see {@link StoreSettings#type} * @param host * see {@link StoreSettings#host} * @param port Loading @@ -175,8 +182,10 @@ public abstract class Store { * @param password * see {@link StoreSettings#password} */ public StoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password) { public StoreSettings(String type, String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password) { this.type = type; this.host = host; this.port = port; this.connectionSecurity = connectionSecurity; Loading @@ -193,6 +202,12 @@ public abstract class Store { public Map<String, String> getExtra() { return null; } protected void putIfNotNull(Map<String, String> map, String key, String value) { if (value != null) { map.put(key, value); } } } Loading
src/com/fsck/k9/mail/store/ImapStore.java +5 −3 Original line number Diff line number Diff line Loading @@ -223,20 +223,22 @@ public class ImapStore extends Store { * @see ImapStore#decodeUri(String) */ private static class ImapStoreSettings extends StoreSettings { private static final String PATH_PREFIX_KEY = "path_prefix"; private static final String STORE_TYPE = "IMAP"; private static final String PATH_PREFIX_KEY = "pathPrefix"; public final String pathPrefix; protected ImapStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password, String pathPrefix) { super(host, port, connectionSecurity, authenticationType, username, password); super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, password); this.pathPrefix = pathPrefix; } @Override public Map<String, String> getExtra() { Map<String, String> extra = new HashMap<String, String>(); extra.put(PATH_PREFIX_KEY, pathPrefix); putIfNotNull(extra, PATH_PREFIX_KEY, pathPrefix); return extra; } } Loading
src/com/fsck/k9/mail/store/Pop3Store.java +4 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ import java.util.HashSet; import java.util.List; public class Pop3Store extends Store { private static final String STORE_TYPE = "POP3"; public static final int CONNECTION_SECURITY_NONE = 0; public static final int CONNECTION_SECURITY_TLS_OPTIONAL = 1; public static final int CONNECTION_SECURITY_TLS_REQUIRED = 2; Loading Loading @@ -99,7 +101,8 @@ public class Pop3Store extends Store { } } return new StoreSettings(host, port, connectionSecurity, null, username, password); return new StoreSettings(STORE_TYPE, host, port, connectionSecurity, null, username, password); } Loading
src/com/fsck/k9/mail/store/WebDavStore.java +7 −5 Original line number Diff line number Diff line Loading @@ -191,6 +191,7 @@ public class WebDavStore extends Store { * @see WebDavStore#decodeUri(String) */ private static class WebDavStoreSettings extends StoreSettings { private static final String STORE_TYPE = "WebDAV"; private static final String ALIAS_KEY = "alias"; private static final String PATH_KEY = "path"; private static final String AUTH_PATH_KEY = "authPath"; Loading @@ -204,7 +205,8 @@ public class WebDavStore extends Store { protected WebDavStoreSettings(String host, int port, ConnectionSecurity connectionSecurity, String authenticationType, String username, String password, String alias, String path, String authPath, String mailboxPath) { super(host, port, connectionSecurity, authenticationType, username, password); super(STORE_TYPE, host, port, connectionSecurity, authenticationType, username, password); this.alias = alias; this.path = path; this.authPath = authPath; Loading @@ -214,10 +216,10 @@ public class WebDavStore extends Store { @Override public Map<String, String> getExtra() { Map<String, String> extra = new HashMap<String, String>(); extra.put(ALIAS_KEY, alias); extra.put(PATH_KEY, path); extra.put(AUTH_PATH_KEY, authPath); extra.put(MAILBOX_PATH_KEY, mailboxPath); putIfNotNull(extra, ALIAS_KEY, alias); putIfNotNull(extra, PATH_KEY, path); putIfNotNull(extra, AUTH_PATH_KEY, authPath); putIfNotNull(extra, MAILBOX_PATH_KEY, mailboxPath); return extra; } } Loading