diff --git a/src/com/fsck/k9/activity/FolderListFilter.java b/src/com/fsck/k9/activity/FolderListFilter.java index 1610dda18..2283b9239 100644 --- a/src/com/fsck/k9/activity/FolderListFilter.java +++ b/src/com/fsck/k9/activity/FolderListFilter.java @@ -81,7 +81,8 @@ public class FolderListFilter extends Filter final ArrayList newValues = new ArrayList(); - for (final T value : values) { + for (final T value : values) + { final String valueText = value.toString().toLowerCase(); for (int k = 0; k < wordCount; k++) diff --git a/src/com/fsck/k9/activity/MessageCompose.java b/src/com/fsck/k9/activity/MessageCompose.java index e5b14cdaf..57ba0a087 100644 --- a/src/com/fsck/k9/activity/MessageCompose.java +++ b/src/com/fsck/k9/activity/MessageCompose.java @@ -1708,14 +1708,14 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc } else { - replyToAddresses = message.getFrom(); + replyToAddresses = message.getFrom(); } - // if we're replying to a message we sent, we probably meant + // if we're replying to a message we sent, we probably meant // to reply to the recipient of that message - if (mAccount.isAnIdentity(replyToAddresses)) + if (mAccount.isAnIdentity(replyToAddresses)) { - replyToAddresses = message.getRecipients(RecipientType.TO); + replyToAddresses = message.getRecipients(RecipientType.TO); } addAddresses(mToView, replyToAddresses); diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index 29fc024b1..88e3a6aa9 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -2090,7 +2090,8 @@ public class MessageView extends K9Activity implements OnClickListener } } - private Bitmap getPreviewIcon(Attachment attachment) { + private Bitmap getPreviewIcon(Attachment attachment) + { try { return BitmapFactory.decodeStream( diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 7b6bfd34b..57da8b949 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -3186,28 +3186,28 @@ public class MessagingController implements Runnable * download it, so we just tell the listener that it's ready to go. */ - if (part.getBody() != null) + if (part.getBody() != null) + { + for (MessagingListener l : getListeners()) { - for (MessagingListener l : getListeners()) - { - l.loadAttachmentStarted(account, message, part, tag, false); - } - if (listener != null) - { - listener.loadAttachmentStarted(account, message, part, tag, false); - } - - for (MessagingListener l : getListeners()) - { - l.loadAttachmentFinished(account, message, part, tag); - } - - if (listener != null) - { - listener.loadAttachmentFinished(account, message, part, tag); - } - return; + l.loadAttachmentStarted(account, message, part, tag, false); } + if (listener != null) + { + listener.loadAttachmentStarted(account, message, part, tag, false); + } + + for (MessagingListener l : getListeners()) + { + l.loadAttachmentFinished(account, message, part, tag); + } + + if (listener != null) + { + listener.loadAttachmentFinished(account, message, part, tag); + } + return; + } diff --git a/src/com/fsck/k9/helper/DomainNameChecker.java b/src/com/fsck/k9/helper/DomainNameChecker.java index d8214909f..308514ef6 100644 --- a/src/com/fsck/k9/helper/DomainNameChecker.java +++ b/src/com/fsck/k9/helper/DomainNameChecker.java @@ -140,15 +140,21 @@ public class DomainNameChecker Collection subjectAltNames = certificate.getSubjectAlternativeNames(); if (subjectAltNames != null) { - for (Object subjectAltName : subjectAltNames) { + for (Object subjectAltName : subjectAltNames) + { List altNameEntry = (List) (subjectAltName); - if ((altNameEntry != null) && (2 <= altNameEntry.size())) { + if ((altNameEntry != null) && (2 <= altNameEntry.size())) + { Integer altNameType = (Integer) (altNameEntry.get(0)); - if (altNameType != null) { - if (altNameType == ALT_IPA_NAME) { + if (altNameType != null) + { + if (altNameType == ALT_IPA_NAME) + { String altName = (String) (altNameEntry.get(1)); - if (altName != null) { - if (K9.DEBUG) { + if (altName != null) + { + if (K9.DEBUG) + { Log.v(K9.LOG_TAG, "alternative IP: " + altName); } if (thisDomain.equalsIgnoreCase(altName)) diff --git a/src/com/fsck/k9/mail/Multipart.java b/src/com/fsck/k9/mail/Multipart.java index 93bb79586..210436847 100644 --- a/src/com/fsck/k9/mail/Multipart.java +++ b/src/com/fsck/k9/mail/Multipart.java @@ -14,39 +14,48 @@ public abstract class Multipart implements Body protected String mContentType; - public void addBodyPart(BodyPart part) { + public void addBodyPart(BodyPart part) + { mParts.add(part); } - public void addBodyPart(BodyPart part, int index) { + public void addBodyPart(BodyPart part, int index) + { mParts.add(index, part); } - public BodyPart getBodyPart(int index) { + public BodyPart getBodyPart(int index) + { return mParts.get(index); } - public String getContentType() { + public String getContentType() + { return mContentType; } - public int getCount() { + public int getCount() + { return mParts.size(); } - public boolean removeBodyPart(BodyPart part) { + public boolean removeBodyPart(BodyPart part) + { return mParts.remove(part); } - public void removeBodyPart(int index) { + public void removeBodyPart(int index) + { mParts.remove(index); } - public Part getParent() { + public Part getParent() + { return mParent; } - public void setParent(Part parent) { + public void setParent(Part parent) + { this.mParent = parent; } diff --git a/src/com/fsck/k9/mail/filter/Base64.java b/src/com/fsck/k9/mail/filter/Base64.java index 2b5a33733..e78f7934f 100644 --- a/src/com/fsck/k9/mail/filter/Base64.java +++ b/src/com/fsck/k9/mail/filter/Base64.java @@ -538,8 +538,10 @@ public class Base64 implements BinaryEncoder, BinaryDecoder */ public static boolean isArrayByteBase64(byte[] arrayOctet) { - for (byte anArrayOctet : arrayOctet) { - if (!isBase64(anArrayOctet) && !isWhiteSpace(anArrayOctet)) { + for (byte anArrayOctet : arrayOctet) + { + if (!isBase64(anArrayOctet) && !isWhiteSpace(anArrayOctet)) + { return false; } } diff --git a/src/com/fsck/k9/mail/internet/BinaryTempFileBody.java b/src/com/fsck/k9/mail/internet/BinaryTempFileBody.java index 9026cf5b8..f7fdf52e7 100644 --- a/src/com/fsck/k9/mail/internet/BinaryTempFileBody.java +++ b/src/com/fsck/k9/mail/internet/BinaryTempFileBody.java @@ -24,7 +24,8 @@ public class BinaryTempFileBody implements Body mTempDirectory = tempDirectory; } - public BinaryTempFileBody() { + public BinaryTempFileBody() + { if (mTempDirectory == null) { throw new diff --git a/src/com/fsck/k9/mail/internet/MimeBodyPart.java b/src/com/fsck/k9/mail/internet/MimeBodyPart.java index 9b85ac6f4..e58d44e08 100644 --- a/src/com/fsck/k9/mail/internet/MimeBodyPart.java +++ b/src/com/fsck/k9/mail/internet/MimeBodyPart.java @@ -39,7 +39,8 @@ public class MimeBodyPart extends BodyPart setBody(body); } - protected String getFirstHeader(String name) { + protected String getFirstHeader(String name) + { return mHeader.getFirstHeader(name); } @@ -63,7 +64,8 @@ public class MimeBodyPart extends BodyPart mHeader.removeHeader(name); } - public Body getBody() { + public Body getBody() + { return mBody; } @@ -147,7 +149,8 @@ public class MimeBodyPart extends BodyPart return getMimeType().equals(mimeType); } - public int getSize() { + public int getSize() + { return mSize; } diff --git a/src/com/fsck/k9/mail/internet/MimeHeader.java b/src/com/fsck/k9/mail/internet/MimeHeader.java index 614652f2b..d45ba6878 100644 --- a/src/com/fsck/k9/mail/internet/MimeHeader.java +++ b/src/com/fsck/k9/mail/internet/MimeHeader.java @@ -111,7 +111,8 @@ public class MimeHeader mFields.removeAll(removeFields); } - public void writeTo(OutputStream out) throws IOException { + public void writeTo(OutputStream out) throws IOException + { BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out), 1024); for (Field field : mFields) { diff --git a/src/com/fsck/k9/mail/internet/MimeMessage.java b/src/com/fsck/k9/mail/internet/MimeMessage.java index da6f31117..392bd76bf 100644 --- a/src/com/fsck/k9/mail/internet/MimeMessage.java +++ b/src/com/fsck/k9/mail/internet/MimeMessage.java @@ -121,7 +121,8 @@ public class MimeMessage extends Message addSentDate(sentDate); } - public void setInternalSentDate(Date sentDate) { + public void setInternalSentDate(Date sentDate) + { this.mSentDate = sentDate; } @@ -160,7 +161,8 @@ public class MimeMessage extends Message return MimeUtility.getHeaderParameter(getContentType(), null); } - public int getSize() { + public int getSize() + { return mSize; } @@ -253,7 +255,8 @@ public class MimeMessage extends Message * Returns the unfolded, decoded value of the Subject header. */ @Override - public String getSubject() { + public String getSubject() + { return MimeUtility.unfoldAndDecode(getFirstHeader("Subject")); } @@ -264,7 +267,8 @@ public class MimeMessage extends Message } @Override - public Address[] getFrom() { + public Address[] getFrom() + { if (mFrom == null) { String list = MimeUtility.unfold(getFirstHeader("From")); @@ -295,7 +299,8 @@ public class MimeMessage extends Message } @Override - public Address[] getReplyTo() { + public Address[] getReplyTo() + { if (mReplyTo == null) { mReplyTo = Address.parse(MimeUtility.unfold(getFirstHeader("Reply-to"))); @@ -405,7 +410,8 @@ public class MimeMessage extends Message } @Override - public Body getBody() { + public Body getBody() + { return mBody; } diff --git a/src/com/fsck/k9/mail/internet/MimeMultipart.java b/src/com/fsck/k9/mail/internet/MimeMultipart.java index 169cbf721..5e730c9ff 100644 --- a/src/com/fsck/k9/mail/internet/MimeMultipart.java +++ b/src/com/fsck/k9/mail/internet/MimeMultipart.java @@ -54,20 +54,24 @@ public class MimeMultipart extends Multipart return sb.toString().toUpperCase(); } - public String getPreamble() { + public String getPreamble() + { return mPreamble; } - public void setPreamble(String preamble) { + public void setPreamble(String preamble) + { this.mPreamble = preamble; } @Override - public String getContentType() { + public String getContentType() + { return mContentType; } - public void setSubType(String subType) { + public void setSubType(String subType) + { this.mSubType = subType; mContentType = String.format("multipart/%s; boundary=\"%s\"", subType, mBoundary); } diff --git a/src/com/fsck/k9/mail/store/ImapStore.java b/src/com/fsck/k9/mail/store/ImapStore.java index 3cade85a5..a22da5818 100644 --- a/src/com/fsck/k9/mail/store/ImapStore.java +++ b/src/com/fsck/k9/mail/store/ImapStore.java @@ -216,7 +216,8 @@ public class ImapStore extends Store } @Override - public Folder getFolder(String name) { + public Folder getFolder(String name) + { ImapFolder folder; synchronized (mFolderCache) { @@ -666,7 +667,8 @@ public class ImapStore extends Store } @Override - public OpenMode getMode() { + public OpenMode getMode() + { return mMode; } @@ -1495,7 +1497,8 @@ public class ImapStore extends Store } @Override - public Flag[] getPermanentFlags() { + public Flag[] getPermanentFlags() + { return PERMANENT_FLAGS; } @@ -2012,7 +2015,8 @@ public class ImapStore extends Store } } - private MessagingException ioExceptionHandler(ImapConnection connection, IOException ioe) { + private MessagingException ioExceptionHandler(ImapConnection connection, IOException ioe) + { Log.e(K9.LOG_TAG, "IOException for " + getLogId(), ioe); if (connection != null) { @@ -2582,7 +2586,8 @@ public class ImapStore extends Store return readResponse(null); } - private ImapResponse readResponse(ImapResponseParser.IImapResponseCallback callback) throws IOException { + private ImapResponse readResponse(ImapResponseParser.IImapResponseCallback callback) throws IOException + { try { ImapResponse response = mParser.readResponse(callback); diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index aca0699af..23dfcfff4 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -945,7 +945,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati } @Override - public LocalFolder getFolder(String name) { + public LocalFolder getFolder(String name) + { return new LocalFolder(name); } @@ -1802,7 +1803,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati } @Override - public OpenMode getMode() { + public OpenMode getMode() + { return OpenMode.READ_WRITE; } @@ -3568,7 +3570,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati } @Override - public Flag[] getPermanentFlags() { + public Flag[] getPermanentFlags() + { return PERMANENT_FLAGS; } @@ -5887,7 +5890,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati super(body); } - public LocalTextBody(String body, String bodyForDisplay) { + public LocalTextBody(String body, String bodyForDisplay) + { super(body); this.mBodyForDisplay = bodyForDisplay; } @@ -5925,7 +5929,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati { } - LocalMessage(String uid, Folder folder) { + LocalMessage(String uid, Folder folder) + { this.mUid = uid; this.mFolder = folder; } @@ -6337,7 +6342,8 @@ public class LocalStore extends Store implements Serializable, LocalStoreMigrati } } - private void updateFolderCountsOnFlag(Flag flag, boolean set) { + private void updateFolderCountsOnFlag(Flag flag, boolean set) + { /* * Update the unread count on the folder. */ diff --git a/src/com/fsck/k9/mail/store/Pop3Store.java b/src/com/fsck/k9/mail/store/Pop3Store.java index bb8a7aaf0..0abd35286 100644 --- a/src/com/fsck/k9/mail/store/Pop3Store.java +++ b/src/com/fsck/k9/mail/store/Pop3Store.java @@ -147,7 +147,8 @@ public class Pop3Store extends Store } @Override - public Folder getFolder(String name) { + public Folder getFolder(String name) + { Folder folder = mFolders.get(name); if (folder == null) { @@ -329,7 +330,8 @@ public class Pop3Store extends Store } @Override - public OpenMode getMode() { + public OpenMode getMode() + { return OpenMode.READ_WRITE; } @@ -861,7 +863,8 @@ public class Pop3Store extends Store } @Override - public Flag[] getPermanentFlags() { + public Flag[] getPermanentFlags() + { return PERMANENT_FLAGS; } @@ -982,7 +985,8 @@ public class Pop3Store extends Store mOut.flush(); } - private Pop3Capabilities getCapabilities() throws IOException { + private Pop3Capabilities getCapabilities() throws IOException + { Pop3Capabilities capabilities = new Pop3Capabilities(); try { @@ -1099,7 +1103,8 @@ public class Pop3Store extends Store class Pop3Message extends MimeMessage { - public Pop3Message(String uid, Pop3Folder folder) { + public Pop3Message(String uid, Pop3Folder folder) + { mUid = uid; mFolder = folder; mSize = -1; diff --git a/src/com/fsck/k9/mail/store/StorageManager.java b/src/com/fsck/k9/mail/store/StorageManager.java index a695d3601..83eb6b74b 100644 --- a/src/com/fsck/k9/mail/store/StorageManager.java +++ b/src/com/fsck/k9/mail/store/StorageManager.java @@ -550,7 +550,8 @@ public class StorageManager * @return Whether the specified file matches a filesystem root. * @throws IOException */ - public static boolean isMountPoint(final File file) { + public static boolean isMountPoint(final File file) + { for (final File root : File.listRoots()) { if (root.equals(file)) diff --git a/src/com/fsck/k9/mail/store/WebDavStore.java b/src/com/fsck/k9/mail/store/WebDavStore.java index f3ddeed2b..8689b0fd7 100644 --- a/src/com/fsck/k9/mail/store/WebDavStore.java +++ b/src/com/fsck/k9/mail/store/WebDavStore.java @@ -349,7 +349,8 @@ public class WebDavStore extends Store } @Override - public Folder getFolder(String name) { + public Folder getFolder(String name) + { WebDavFolder folder; if ((folder = this.mFolderList.get(name)) == null) @@ -1272,7 +1273,8 @@ public class WebDavStore extends Store } @Override - public OpenMode getMode() { + public OpenMode getMode() + { return OpenMode.READ_WRITE; } @@ -1746,7 +1748,8 @@ public class WebDavStore extends Store } @Override - public Flag[] getPermanentFlags() { + public Flag[] getPermanentFlags() + { return PERMANENT_FLAGS; } @@ -1943,7 +1946,8 @@ public class WebDavStore extends Store private String mUrl = ""; - WebDavMessage(String uid, Folder folder) { + WebDavMessage(String uid, Folder folder) + { this.mUid = uid; this.mFolder = folder; } diff --git a/src/com/fsck/k9/preferences/Editor.java b/src/com/fsck/k9/preferences/Editor.java index 62e966d05..4b2de49a7 100644 --- a/src/com/fsck/k9/preferences/Editor.java +++ b/src/com/fsck/k9/preferences/Editor.java @@ -72,7 +72,8 @@ public class Editor implements android.content.SharedPreferences.Editor } } - public void commitChanges() { + public void commitChanges() + { long startTime = System.currentTimeMillis(); Log.i(K9.LOG_TAG, "Committing preference changes"); Runnable committer = new Runnable() diff --git a/src/com/fsck/k9/provider/MessageProvider.java b/src/com/fsck/k9/provider/MessageProvider.java index 3f2b13a08..a6fadc3f0 100644 --- a/src/com/fsck/k9/provider/MessageProvider.java +++ b/src/com/fsck/k9/provider/MessageProvider.java @@ -982,7 +982,8 @@ public class MessageProvider extends ContentProvider K9.registerApplicationAware(new K9.ApplicationAware() { @Override - public void initializeComponent(final K9 application) { + public void initializeComponent(final K9 application) + { Log.v(K9.LOG_TAG, "Registering content resolver notifier"); MessagingController.getInstance(application).addListener(new MessagingListener() diff --git a/src/com/fsck/k9/web/AccessibleEmailContentActivity.java b/src/com/fsck/k9/web/AccessibleEmailContentActivity.java index 75a2cfdc3..0067b6f6c 100644 --- a/src/com/fsck/k9/web/AccessibleEmailContentActivity.java +++ b/src/com/fsck/k9/web/AccessibleEmailContentActivity.java @@ -43,8 +43,10 @@ public class AccessibleEmailContentActivity extends ListActivity String[] rawListItems = parsedHtml.toString().split("\n"); ArrayList cleanedList = new ArrayList(); - for (String rawListItem : rawListItems) { - if (rawListItem.trim().length() > 0) { + for (String rawListItem : rawListItems) + { + if (rawListItem.trim().length() > 0) + { addToCleanedList(cleanedList, rawListItem); } }