Minor code style fixes

This commit is contained in:
cketti 2015-02-23 03:36:34 +01:00
parent d5d42469b0
commit 737e0d2ac8
1 changed files with 10 additions and 7 deletions

View File

@ -23,11 +23,9 @@ import java.net.URISyntaxException;
*/ */
public class AccountSetupAccountType extends K9Activity implements OnClickListener { public class AccountSetupAccountType extends K9Activity implements OnClickListener {
private static final String EXTRA_ACCOUNT = "account"; private static final String EXTRA_ACCOUNT = "account";
private static final String EXTRA_MAKE_DEFAULT = "makeDefault"; private static final String EXTRA_MAKE_DEFAULT = "makeDefault";
private Account mAccount; private Account mAccount;
private boolean mMakeDefault; private boolean mMakeDefault;
public static void actionSelectAccountType(Context context, Account account, boolean makeDefault) { public static void actionSelectAccountType(Context context, Account account, boolean makeDefault) {
@ -52,11 +50,13 @@ public class AccountSetupAccountType extends K9Activity implements OnClickListen
private void setupStoreAndSmtpTransport(String schemePrefix) throws URISyntaxException { private void setupStoreAndSmtpTransport(String schemePrefix) throws URISyntaxException {
URI storeUriForDecode = new URI(mAccount.getStoreUri()); URI storeUriForDecode = new URI(mAccount.getStoreUri());
URI storeUri = new URI(schemePrefix, storeUriForDecode.getUserInfo(), storeUriForDecode.getHost(), storeUriForDecode.getPort(), null, null, null); URI storeUri = new URI(schemePrefix, storeUriForDecode.getUserInfo(), storeUriForDecode.getHost(),
storeUriForDecode.getPort(), null, null, null);
mAccount.setStoreUri(storeUri.toString()); mAccount.setStoreUri(storeUri.toString());
URI transportUriForDecode = new URI(mAccount.getTransportUri()); URI transportUriForDecode = new URI(mAccount.getTransportUri());
URI transportUri = new URI("smtp+tls+", transportUriForDecode.getUserInfo(), transportUriForDecode.getHost(), transportUriForDecode.getPort(), null, null, null); URI transportUri = new URI("smtp+tls+", transportUriForDecode.getUserInfo(), transportUriForDecode.getHost(),
transportUriForDecode.getPort(), null, null, null);
mAccount.setTransportUri(transportUri.toString()); mAccount.setTransportUri(transportUri.toString());
} }
@ -85,15 +85,18 @@ public class AccountSetupAccountType extends K9Activity implements OnClickListen
public void onClick(View v) { public void onClick(View v) {
try { try {
switch (v.getId()) { switch (v.getId()) {
case R.id.pop: case R.id.pop: {
setupStoreAndSmtpTransport("pop3+ssl+"); setupStoreAndSmtpTransport("pop3+ssl+");
break; break;
case R.id.imap: }
case R.id.imap: {
setupStoreAndSmtpTransport("imap+ssl+"); setupStoreAndSmtpTransport("imap+ssl+");
break; break;
case R.id.webdav: }
case R.id.webdav: {
setupDav(); setupDav();
break; break;
}
} }
} catch (Exception ex) { } catch (Exception ex) {
failure(ex); failure(ex);