From 70a1eef943f8ebdb38fdd8769789677dc006da3f Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 13 Jul 2010 21:16:56 +0000 Subject: [PATCH] astyle --- src/com/fsck/k9/activity/MessageList.java | 32 +++++++++---------- .../fsck/k9/mail/internet/MimeBodyPart.java | 18 ++++++----- src/com/fsck/k9/mail/store/LocalStore.java | 11 +++++-- 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 2e9c0d125..9274ac840 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -2061,7 +2061,7 @@ public class MessageList * 2010-06-21 - cketti * Added null pointer check. Not sure what's causing 'holder' * to be null. See log provided in issue 1749, comment #15. - * + * * Please remove this comment once the cause was found and the * bug(?) fixed. */ @@ -2197,7 +2197,7 @@ public class MessageList holder.preview = (TextView) view.findViewById(R.id.preview); holder.selected = (CheckBox) view.findViewById(R.id.selected_checkbox); holder.flagged = (CheckBox) view.findViewById(R.id.flagged); - + // TODO: Don't create an instance of OnClickListener for every message holder.flagged.setOnClickListener(new OnClickListener() { @@ -2268,20 +2268,20 @@ public class MessageList * from. */ holder.preview.setText(message.sender + " " + message.preview, - TextView.BufferType.SPANNABLE); + TextView.BufferType.SPANNABLE); Spannable str = (Spannable)holder.preview.getText(); // Create our span sections, and assign a format to each. str.setSpan( - new TextAppearanceSpan( - null, - Typeface.BOLD, - -1, - holder.subject.getTextColors(), - holder.subject.getLinkTextColors()), - 0, - message.sender.length(), - Spannable.SPAN_EXCLUSIVE_EXCLUSIVE + new TextAppearanceSpan( + null, + Typeface.BOLD, + -1, + holder.subject.getTextColors(), + holder.subject.getLinkTextColors()), + 0, + message.sender.length(), + Spannable.SPAN_EXCLUSIVE_EXCLUSIVE ); } else @@ -2984,7 +2984,7 @@ public class MessageList if (mController.isMoveCapable(message) == false) { Toast toast = Toast.makeText(this, - R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); + R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); toast.show(); return; } @@ -3019,7 +3019,7 @@ public class MessageList if (mController.isMoveCapable(message) == false) { Toast toast = Toast.makeText(this, - R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); + R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); toast.show(); return; } @@ -3116,7 +3116,7 @@ public class MessageList if (mController.isCopyCapable(message) == false) { Toast toast = Toast.makeText(this, - R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); + R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); toast.show(); return; } @@ -3150,7 +3150,7 @@ public class MessageList if (mController.isCopyCapable(message) == false) { Toast toast = Toast.makeText(this, - R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); + R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG); toast.show(); return; } diff --git a/src/com/fsck/k9/mail/internet/MimeBodyPart.java b/src/com/fsck/k9/mail/internet/MimeBodyPart.java index 401168f28..8acd0bfec 100644 --- a/src/com/fsck/k9/mail/internet/MimeBodyPart.java +++ b/src/com/fsck/k9/mail/internet/MimeBodyPart.java @@ -126,14 +126,16 @@ public class MimeBodyPart extends BodyPart } else { - int first = contentId.indexOf('<'); - int last = contentId.lastIndexOf('>'); - if (first != -1 && last != -1) { - return contentId.substring(first+1, last); - } - else { - return contentId; - } + int first = contentId.indexOf('<'); + int last = contentId.lastIndexOf('>'); + if (first != -1 && last != -1) + { + return contentId.substring(first+1, last); + } + else + { + return contentId; + } } } diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index 4889129f7..9d039f8b7 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -2068,7 +2068,8 @@ public class LocalStore extends Store implements Serializable { Cursor cursor = null; cursor = mDb.query("messages", new String[] { "html_content" }, "id = ?", new String[] { Long.toString(messageId) }, null, null, null); - try { + try + { if (cursor.moveToNext()) { String new_html; @@ -2081,8 +2082,12 @@ public class LocalStore extends Store implements Serializable mDb.update("messages", cv, "id = ?", new String[] { Long.toString(messageId) }); } } - finally { - if (cursor != null) { cursor.close(); } + finally + { + if (cursor != null) + { + cursor.close(); + } } }