From 7cbbd72facd7ae8de5629a68d62d92c5f91500f2 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 13 Feb 2011 19:47:30 -0500 Subject: [PATCH] Astyle --- src/com/fsck/k9/Account.java | 2 +- src/com/fsck/k9/mail/store/LocalStore.java | 30 ++++++++++----------- src/com/fsck/k9/mail/store/WebDavStore.java | 15 +++++------ src/com/fsck/k9/view/MessageCryptoView.java | 2 +- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index f7c58ecb4..d783eebb5 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -684,7 +684,7 @@ public class Account implements BaseAccount { successful = true; } catch (MessagingException e) { Log.e(K9.LOG_TAG, "Switching local storage provider from " + - mLocalStorageProviderId + " to " + id + " failed.", e); + mLocalStorageProviderId + " to " + id + " failed.", e); } finally { // if migration to/from SD-card failed once, it will fail again. if (!successful) { diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index 672554921..d316c4d5a 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -2021,23 +2021,23 @@ public class LocalStore extends Store implements Serializable { } public void destroyMessages(final Message[] messages) throws MessagingException { - try { - database.execute(true, new DbCallback() { - @Override - public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException { - for (Message message : messages) { - try { - message.destroy(); - } catch (MessagingException e) { - throw new WrappedException(e); - } + try { + database.execute(true, new DbCallback() { + @Override + public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException { + for (Message message : messages) { + try { + message.destroy(); + } catch (MessagingException e) { + throw new WrappedException(e); } - return null; } - }); - } catch (MessagingException e) { - throw new WrappedException(e); - } + return null; + } + }); + } catch (MessagingException e) { + throw new WrappedException(e); + } } diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index 6950e6816..35007dad3 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -539,8 +539,7 @@ public class WebDavStore extends Store { info.requiredAuthType = AUTH_TYPE_BASIC; } else if ((info.statusCode >= 200 && info.statusCode < 300) || // Success (info.statusCode >= 300 && info.statusCode < 400) || // Redirect - (info.statusCode == 440)) // Unauthorized - { + (info.statusCode == 440)) { // Unauthorized // We will handle all 3 situations the same. First we take an educated // guess at where the authorization DLL is located. If this is this // doesn't work, then we'll use the redirection URL for OWA login given @@ -666,7 +665,7 @@ public class WebDavStore extends Store { request = new HttpGeneric(loginUrl); request.setMethod("POST"); request.setEntity(formEntity); - + response = httpClient.executeOverride(request, mContext); authenticated = testAuthenticationResponse(response); } catch (URISyntaxException e) { @@ -720,8 +719,8 @@ public class WebDavStore extends Store { return formAction; } - - private boolean testAuthenticationResponse(HttpResponse response) + + private boolean testAuthenticationResponse(HttpResponse response) throws MessagingException { boolean authenticated = false; int statusCode = response.getStatusLine().getStatusCode(); @@ -743,14 +742,14 @@ public class WebDavStore extends Store { try { String thisPath = new URI(mUrl).getPath(); String redirectPath = new URI(info.redirectUrl).getPath(); - + if (!thisPath.endsWith("/")) { thisPath = thisPath.concat("/"); } if (!redirectPath.endsWith("/")) { redirectPath = redirectPath.concat("/"); } - + if (redirectPath.equalsIgnoreCase(thisPath)) { authenticated = true; } else { @@ -769,7 +768,7 @@ public class WebDavStore extends Store { } } } - + return authenticated; } diff --git a/src/com/fsck/k9/view/MessageCryptoView.java b/src/com/fsck/k9/view/MessageCryptoView.java index 479447c72..e0e8d0480 100644 --- a/src/com/fsck/k9/view/MessageCryptoView.java +++ b/src/com/fsck/k9/view/MessageCryptoView.java @@ -50,7 +50,7 @@ public class MessageCryptoView extends LinearLayout { } - public void hide () { + public void hide() { this.setVisibility(View.GONE); }