diff --git a/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java b/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java index dc5182659..8c8390c21 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupAutoConfiguration.java @@ -153,11 +153,11 @@ public class AccountSetupAutoConfiguration extends K9Activity implements View.On // parse and finish // remember if i >= UNSAFE_URL_START => POSSIBLE UNSAFE DATA, alert user!!! parse(data); - try { - Thread.sleep(1750); - } catch (InterruptedException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } + + // Give user some time to read output + try { Thread.sleep(1750); + } catch (InterruptedException e) { e.printStackTrace(); } + finish(); return; } diff --git a/src/com/fsck/k9/helper/configxmlparser/AutoconfigInfo.java b/src/com/fsck/k9/helper/configxmlparser/AutoconfigInfo.java index a5936f1e4..169d06127 100644 --- a/src/com/fsck/k9/helper/configxmlparser/AutoconfigInfo.java +++ b/src/com/fsck/k9/helper/configxmlparser/AutoconfigInfo.java @@ -61,20 +61,24 @@ public class AutoconfigInfo { Server types hierarchy *******************************************************************************/ public static abstract class Server{ - public ServerType type = ServerType.UNSET; + public ServerType type; public String hostname; public int port; public SocketType socketType; public String username; public AuthenticationType authentication; + + public Server(ServerType type){ this.type = type; } } public static abstract class IncomingServer extends Server{ - } + public IncomingServer(ServerType type) {super(type);} + } public static abstract class OutgoingServer extends Server{ public RestrictionType restriction; - } + public OutgoingServer(ServerType type) {super(type);} + } public static class IncomingServerPOP3 extends IncomingServer { // hardcode the type @@ -85,10 +89,16 @@ public class AutoconfigInfo { public boolean downloadOnBiff; public int daysToLeaveMessagesOnServer; public int checkInterval; + + // constructor + public IncomingServerPOP3(){ super(ServerType.POP3); } } public static class IncomingServerIMAP extends IncomingServer { public ServerType type = ServerType.IMAP; + + // constructor + public IncomingServerIMAP(){ super(ServerType.IMAP); } } public static class OutgoingServerSMTP extends OutgoingServer { @@ -98,6 +108,9 @@ public class AutoconfigInfo { // SMTP options public boolean addThisServer; public boolean useGlobalPreferredServer; + + // constructor + public OutgoingServerSMTP(){ super(ServerType.SMTP); } } diff --git a/src/com/fsck/k9/helper/configxmlparser/ConfigurationXMLHandler.java b/src/com/fsck/k9/helper/configxmlparser/ConfigurationXMLHandler.java index a7b1f3c3f..1cd7861d4 100644 --- a/src/com/fsck/k9/helper/configxmlparser/ConfigurationXMLHandler.java +++ b/src/com/fsck/k9/helper/configxmlparser/ConfigurationXMLHandler.java @@ -79,7 +79,7 @@ public class ConfigurationXMLHandler extends DefaultHandler { POP3, LEAVEMESSAGESONSERVER, DOWNLOADONBIFF, DAYSTOLEAVEMESSAGESONSERVER, CHECKINTERVAL, // outgoing server settings - RESTRICTION, ADDTHISSERVER, USEGLOBALPREFFEREDSERVER, + RESTRICTION, ADDTHISSERVER, USEGLOBALPREFERREDSERVER, // meta NO_VALUE, WRONG_TAG; @@ -325,7 +325,7 @@ public class ConfigurationXMLHandler extends DefaultHandler { // Outgoing extras case RESTRICTION: case ADDTHISSERVER: - case USEGLOBALPREFFEREDSERVER: + case USEGLOBALPREFERREDSERVER: if( mServerInProgress == null || mServerInProgress.type != ServerType.SMTP ) throw new SAXParseException ("Illegal outgoingServer extra-settings tag. " + @@ -333,7 +333,7 @@ public class ConfigurationXMLHandler extends DefaultHandler { switch(TAG.toTag(localName)){ case RESTRICTION: mIsRestriction = true; break; case ADDTHISSERVER: mIsAddThisServer = true; break; - case USEGLOBALPREFFEREDSERVER: mIsUseGlobalPreferredServer = true; break; + case USEGLOBALPREFERREDSERVER: mIsUseGlobalPreferredServer = true; break; } break;