From bef10812d3ebe49a87188271baa0744343dd356c Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Mon, 14 Jul 2014 13:54:13 -0400 Subject: [PATCH] Fix so WebDAV does not have STARTTLS auth. type option --- .../activity/setup/AccountSetupIncoming.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/com/fsck/k9/activity/setup/AccountSetupIncoming.java b/src/com/fsck/k9/activity/setup/AccountSetupIncoming.java index 493a682de..47f2b0d30 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupIncoming.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupIncoming.java @@ -164,16 +164,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener try { ServerSettings settings = Store.decodeStoreUri(mAccount.getStoreUri()); - ArrayAdapter securityTypesAdapter = - ConnectionSecurity.getArrayAdapter(this, mConnectionSecurityChoices); - mSecurityTypeView.setAdapter(securityTypesAdapter); - - // Select currently configured security type - mCurrentSecurityTypeViewPosition = securityTypesAdapter.getPosition(settings.connectionSecurity); - mSecurityTypeView.setSelection(mCurrentSecurityTypeViewPosition, false); - - updateAuthPlainTextFromSecurityType(settings.connectionSecurity); - // The first item is selected if settings.authenticationType is null or is not in mAuthTypeAdapter mCurrentAuthTypeViewPosition = mAuthTypeAdapter.getPosition(settings.authenticationType); mAuthTypeView.setSelection(mCurrentAuthTypeViewPosition, false); @@ -260,6 +250,17 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener throw new Exception("Unknown account type: " + mAccount.getStoreUri()); } + // Note that mConnectionSecurityChoices is configured above based on server type + ArrayAdapter securityTypesAdapter = + ConnectionSecurity.getArrayAdapter(this, mConnectionSecurityChoices); + mSecurityTypeView.setAdapter(securityTypesAdapter); + + // Select currently configured security type + mCurrentSecurityTypeViewPosition = securityTypesAdapter.getPosition(settings.connectionSecurity); + mSecurityTypeView.setSelection(mCurrentSecurityTypeViewPosition, false); + + updateAuthPlainTextFromSecurityType(settings.connectionSecurity); + mCompressionMobile.setChecked(mAccount.useCompression(Account.TYPE_MOBILE)); mCompressionWifi.setChecked(mAccount.useCompression(Account.TYPE_WIFI)); mCompressionOther.setChecked(mAccount.useCompression(Account.TYPE_OTHER));