find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren

This commit is contained in:
Jesse Vincent 2010-05-30 04:17:00 +00:00
parent 6b5bcd2c4d
commit 1a66072910
18 changed files with 226 additions and 222 deletions

View File

@ -175,7 +175,7 @@ public class Account implements BaseAccount
mIdleRefreshMinutes = preferences.getPreferences().getInt(mUuid
+ ".idleRefreshMinutes", 24);
mSaveAllHeaders = preferences.getPreferences().getBoolean(mUuid
+ ".saveAllHeaders", false);
+ ".saveAllHeaders", false);
mPushPollOnConnect = preferences.getPreferences().getBoolean(mUuid
+ ".pushPollOnConnect", true);
mDisplayCount = preferences.getPreferences().getInt(mUuid + ".displayCount", -1);

View File

@ -360,9 +360,9 @@ public class FolderList extends K9ListActivity
// This will be called either automatically for you on 2.0
// or later, or by the code above on earlier versions of the
// platform.
if (K9.manageBack() )
if (K9.manageBack())
{
onAccounts();
onAccounts();
}
}
@ -376,7 +376,7 @@ public class FolderList extends K9ListActivity
keyCode == KeyEvent.KEYCODE_BACK
&& event.getRepeatCount() == 0
&& K9.manageBack() )
&& K9.manageBack())
{
// Take care of calling this method on earlier versions of
// the platform where it doesn't exist.

View File

@ -396,8 +396,8 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
}
//TODO: Use constant Intent.ACTION_SEND_MULTIPLE once we drop Android 1.5 support
else if (Intent.ACTION_SEND.equals(action)
|| Intent.ACTION_SENDTO.equals(action)
|| "android.intent.action.SEND_MULTIPLE".equals(action))
|| Intent.ACTION_SENDTO.equals(action)
|| "android.intent.action.SEND_MULTIPLE".equals(action))
{
/*
* Someone is trying to compose an email with an attachment, probably Pictures.

View File

@ -583,7 +583,9 @@ public class MessageList
if (K9.manageBack())
{
onShowFolderList();
} else {
}
else
{
finish();
}
}
@ -597,7 +599,7 @@ public class MessageList
// android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ECLAIR &&
keyCode == KeyEvent.KEYCODE_BACK
&& event.getRepeatCount() == 0
)
)
{
// Take care of calling this method on earlier versions of
// the platform where it doesn't exist.

View File

@ -492,7 +492,7 @@ public class MessageView extends K9Activity implements OnClickListener
messageToShow = R.string.message_no_additional_headers_available;
}
}
catch(MessagingException e)
catch (MessagingException e)
{
messageToShow = R.string.message_additional_headers_retrieval_failed;
}
@ -512,8 +512,8 @@ public class MessageView extends K9Activity implements OnClickListener
* Set up the additional headers text view with the supplied header data.
*
* @param additionalHeaders
* List of header entries. Each entry consists of a header
* name and a header value. Header names may appear multiple
* List of header entries. Each entry consists of a header
* name and a header value. Header names may appear multiple
* times.
*
* This method is always called from within the UI thread by
@ -1031,8 +1031,8 @@ public class MessageView extends K9Activity implements OnClickListener
}
private List<HeaderEntry> getAdditionalHeaders(final Message message)
throws MessagingException
{
throws MessagingException
{
List<HeaderEntry> additionalHeaders = new LinkedList<HeaderEntry>();
// Do not include the following headers, since they are always visible anyway
@ -1277,8 +1277,8 @@ public class MessageView extends K9Activity implements OnClickListener
onShowPictures();
break;
case R.id.header_container:
onShowAdditionalHeaders();
break;
onShowAdditionalHeaders();
break;
}
}
@ -1363,7 +1363,7 @@ public class MessageView extends K9Activity implements OnClickListener
if (additionalHeadersItem != null)
{
additionalHeadersItem.setTitle((mAdditionalHeadersView.getVisibility() == View.VISIBLE) ?
R.string.hide_full_header_action : R.string.show_full_header_action);
R.string.hide_full_header_action : R.string.show_full_header_action);
}
}
}

View File

@ -901,7 +901,7 @@ public class MessagingController implements Runnable
String[] queryFields = {"html_content","subject","sender_list"};
LocalStore localStore = account.getLocalStore();
localStore.searchForMessages(retrievalListener, queryFields
, query, foldersToSearch,
, query, foldersToSearch,
messagesToSearch == null ? null : messagesToSearch.toArray(new Message[0]),
requiredFlags, forbiddenFlags);

View File

@ -95,7 +95,7 @@ public class DomainNameChecker
if (rval)
{
rval = domain.equals(InetAddress.getByName(domain)
.getHostAddress());
.getHostAddress());
}
}
catch (UnknownHostException e)
@ -109,7 +109,7 @@ public class DomainNameChecker
if (K9.DEBUG)
{
Log.v(K9.LOG_TAG, "DomainNameChecker.isIpAddress(): "
+ errorMessage);
+ errorMessage);
}
rval = false;
@ -144,15 +144,15 @@ public class DomainNameChecker
Iterator<?> i = subjectAltNames.iterator();
while (i.hasNext())
{
List<?> altNameEntry = (List<?>) (i.next());
List<?> altNameEntry = (List<?>)(i.next());
if ((altNameEntry != null) && (2 <= altNameEntry.size()))
{
Integer altNameType = (Integer) (altNameEntry.get(0));
Integer altNameType = (Integer)(altNameEntry.get(0));
if (altNameType != null)
{
if (altNameType.intValue() == ALT_IPA_NAME)
{
String altName = (String) (altNameEntry.get(1));
String altName = (String)(altNameEntry.get(1));
if (altName != null)
{
if (K9.DEBUG)
@ -198,16 +198,16 @@ public class DomainNameChecker
Iterator<?> i = subjectAltNames.iterator();
while (i.hasNext())
{
List<?> altNameEntry = (List<?>) (i.next());
List<?> altNameEntry = (List<?>)(i.next());
if ((altNameEntry != null) && (2 <= altNameEntry.size()))
{
Integer altNameType = (Integer) (altNameEntry.get(0));
Integer altNameType = (Integer)(altNameEntry.get(0));
if (altNameType != null)
{
if (altNameType.intValue() == ALT_DNS_NAME)
{
hasDns = true;
String altName = (String) (altNameEntry.get(1));
String altName = (String)(altNameEntry.get(1));
if (altName != null)
{
if (matchDns(thisDomain, altName))
@ -237,7 +237,7 @@ public class DomainNameChecker
}
Log.v(K9.LOG_TAG, "DomainNameChecker.matchDns(): "
+ errorMessage);
+ errorMessage);
}
}
@ -250,7 +250,7 @@ public class DomainNameChecker
{
if (oid.elementAt(i).equals(X509Name.CN))
{
return matchDns(thisDomain, (String) (val.elementAt(i)));
return matchDns(thisDomain, (String)(val.elementAt(i)));
}
}
}
@ -270,8 +270,8 @@ public class DomainNameChecker
if (K9.DEBUG)
{
Log.v(K9.LOG_TAG, "DomainNameChecker.matchDns():"
+ " this domain: " + thisDomain + " that domain: "
+ thatDomain);
+ " this domain: " + thisDomain + " that domain: "
+ thatDomain);
}
if ((thisDomain == null) || (thisDomain.length() == 0)
@ -311,7 +311,7 @@ public class DomainNameChecker
// (d) OR we have a *-component match:
// f*.com matches foo.com but not bar.com
rval = domainTokenMatch(thisDomainTokens[0],
thatDomainTokens[0]);
thatDomainTokens[0]);
}
}
@ -346,7 +346,7 @@ public class DomainNameChecker
String suffix = thatDomainToken.substring(starIndex + 1);
return thisDomainToken.startsWith(prefix)
&& thisDomainToken.endsWith(suffix);
&& thisDomainToken.endsWith(suffix);
}
}
}

View File

@ -28,32 +28,32 @@ public class Regex
* This pattern is auto-generated by //device/tools/make-iana-tld-pattern.py
*/
public static final Pattern TOP_LEVEL_DOMAIN_PATTERN
= Pattern.compile(
"((aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
+ "|(biz|b[abdefghijmnorstvwyz])"
+ "|(cat|com|coop|c[acdfghiklmnoruvxyz])"
+ "|d[ejkmoz]"
+ "|(edu|e[cegrstu])"
+ "|f[ijkmor]"
+ "|(gov|g[abdefghilmnpqrstuwy])"
+ "|h[kmnrtu]"
+ "|(info|int|i[delmnoqrst])"
+ "|(jobs|j[emop])"
+ "|k[eghimnrwyz]"
+ "|l[abcikrstuvy]"
+ "|(mil|mobi|museum|m[acdghklmnopqrstuvwxyz])"
+ "|(name|net|n[acefgilopruz])"
+ "|(org|om)"
+ "|(pro|p[aefghklmnrstwy])"
+ "|qa"
+ "|r[eouw]"
+ "|s[abcdeghijklmnortuvyz]"
+ "|(tel|travel|t[cdfghjklmnoprtvwz])"
+ "|u[agkmsyz]"
+ "|v[aceginu]"
+ "|w[fs]"
+ "|y[etu]"
+ "|z[amw])");
= Pattern.compile(
"((aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
+ "|(biz|b[abdefghijmnorstvwyz])"
+ "|(cat|com|coop|c[acdfghiklmnoruvxyz])"
+ "|d[ejkmoz]"
+ "|(edu|e[cegrstu])"
+ "|f[ijkmor]"
+ "|(gov|g[abdefghilmnpqrstuwy])"
+ "|h[kmnrtu]"
+ "|(info|int|i[delmnoqrst])"
+ "|(jobs|j[emop])"
+ "|k[eghimnrwyz]"
+ "|l[abcikrstuvy]"
+ "|(mil|mobi|museum|m[acdghklmnopqrstuvwxyz])"
+ "|(name|net|n[acefgilopruz])"
+ "|(org|om)"
+ "|(pro|p[aefghklmnrstwy])"
+ "|qa"
+ "|r[eouw]"
+ "|s[abcdeghijklmnortuvyz]"
+ "|(tel|travel|t[cdfghjklmnoprtvwz])"
+ "|u[agkmsyz]"
+ "|v[aceginu]"
+ "|w[fs]"
+ "|y[etu]"
+ "|z[amw])");
/**
* Regular expression pattern to match RFC 1738 URLs
@ -62,72 +62,72 @@ public class Regex
* This pattern is auto-generated by //device/tools/make-iana-tld-pattern.py
*/
public static final Pattern WEB_URL_PATTERN
= Pattern.compile(
"((?:(http|https|Http|Https):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
+ "((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+" // named host
+ "(?:" // plus top level domain
+ "(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
+ "|(?:biz|b[abdefghijmnorstvwyz])"
+ "|(?:cat|com|coop|c[acdfghiklmnoruvxyz])"
+ "|d[ejkmoz]"
+ "|(?:edu|e[cegrstu])"
+ "|f[ijkmor]"
+ "|(?:gov|g[abdefghilmnpqrstuwy])"
+ "|h[kmnrtu]"
+ "|(?:info|int|i[delmnoqrst])"
+ "|(?:jobs|j[emop])"
+ "|k[eghimnrwyz]"
+ "|l[abcikrstuvy]"
+ "|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])"
+ "|(?:name|net|n[acefgilopruz])"
+ "|(?:org|om)"
+ "|(?:pro|p[aefghklmnrstwy])"
+ "|qa"
+ "|r[eouw]"
+ "|s[abcdeghijklmnortuvyz]"
+ "|(?:tel|travel|t[cdfghjklmnoprtvwz])"
+ "|u[agkmsyz]"
+ "|v[aceginu]"
+ "|w[fs]"
+ "|y[etu]"
+ "|z[amw]))"
+ "|(?:(?:25[0-5]|2[0-4]" // or ip address
+ "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]"
+ "|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1]"
+ "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
+ "|[1-9][0-9]|[0-9])))"
+ "(?:\\:\\d{1,5})?)" // plus option port number
+ "(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~" // plus option query params
+ "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?"
+ "(?:\\b|$)"); // and finally, a word boundary or end of
// input. This is to stop foo.sure from
// matching as foo.su
= Pattern.compile(
"((?:(http|https|Http|Https):\\/\\/(?:(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
+ "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
+ "((?:(?:[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}\\.)+" // named host
+ "(?:" // plus top level domain
+ "(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])"
+ "|(?:biz|b[abdefghijmnorstvwyz])"
+ "|(?:cat|com|coop|c[acdfghiklmnoruvxyz])"
+ "|d[ejkmoz]"
+ "|(?:edu|e[cegrstu])"
+ "|f[ijkmor]"
+ "|(?:gov|g[abdefghilmnpqrstuwy])"
+ "|h[kmnrtu]"
+ "|(?:info|int|i[delmnoqrst])"
+ "|(?:jobs|j[emop])"
+ "|k[eghimnrwyz]"
+ "|l[abcikrstuvy]"
+ "|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])"
+ "|(?:name|net|n[acefgilopruz])"
+ "|(?:org|om)"
+ "|(?:pro|p[aefghklmnrstwy])"
+ "|qa"
+ "|r[eouw]"
+ "|s[abcdeghijklmnortuvyz]"
+ "|(?:tel|travel|t[cdfghjklmnoprtvwz])"
+ "|u[agkmsyz]"
+ "|v[aceginu]"
+ "|w[fs]"
+ "|y[etu]"
+ "|z[amw]))"
+ "|(?:(?:25[0-5]|2[0-4]" // or ip address
+ "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(?:25[0-5]|2[0-4][0-9]"
+ "|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1]"
+ "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
+ "|[1-9][0-9]|[0-9])))"
+ "(?:\\:\\d{1,5})?)" // plus option port number
+ "(\\/(?:(?:[a-zA-Z0-9\\;\\/\\?\\:\\@\\&\\=\\#\\~" // plus option query params
+ "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?"
+ "(?:\\b|$)"); // and finally, a word boundary or end of
// input. This is to stop foo.sure from
// matching as foo.su
public static final Pattern IP_ADDRESS_PATTERN
= Pattern.compile(
"((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
+ "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
+ "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
+ "|[1-9][0-9]|[0-9]))");
= Pattern.compile(
"((25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\\.(25[0-5]|2[0-4]"
+ "[0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]"
+ "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
+ "|[1-9][0-9]|[0-9]))");
public static final Pattern DOMAIN_NAME_PATTERN
= Pattern.compile(
"(((([a-zA-Z0-9][a-zA-Z0-9\\-]*)*[a-zA-Z0-9]\\.)+"
+ TOP_LEVEL_DOMAIN_PATTERN + ")|"
+ IP_ADDRESS_PATTERN + ")");
= Pattern.compile(
"(((([a-zA-Z0-9][a-zA-Z0-9\\-]*)*[a-zA-Z0-9]\\.)+"
+ TOP_LEVEL_DOMAIN_PATTERN + ")|"
+ IP_ADDRESS_PATTERN + ")");
public static final Pattern EMAIL_ADDRESS_PATTERN
= Pattern.compile(
"[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}" +
"\\@" +
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" +
"(" +
"\\." +
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" +
")+"
);
= Pattern.compile(
"[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}" +
"\\@" +
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" +
"(" +
"\\." +
"[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" +
")+"
);
/**
* This pattern is intended for searching for things that look like they
@ -144,10 +144,10 @@ public class Regex
* </ul>
*/
public static final Pattern PHONE_PATTERN
= Pattern.compile( // sdd = space, dot, or dash
"(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>*
+ "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>*
+ "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit>
= Pattern.compile( // sdd = space, dot, or dash
"(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>*
+ "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>*
+ "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit>
/**
* Convenience method to take all of the non-null matching groups in a

View File

@ -34,11 +34,11 @@ public class TracingPowerManager
private TracingPowerManager(Context context)
{
pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
if (TRACE)
{
timer = new Timer();
}
pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
if (TRACE)
{
timer = new Timer();
}
}
public TracingWakeLock newWakeLock(int flags, String tag)
@ -65,14 +65,14 @@ public class TracingPowerManager
}
public void acquire(long timeout)
{
synchronized(wakeLock)
synchronized (wakeLock)
{
wakeLock.acquire(timeout);
}
if (K9.DEBUG)
{
Log.v(K9.LOG_TAG, "Acquired TracingWakeLock for tag " + tag + " and id " + id
+ " for " + timeout + " ms");
+ " for " + timeout + " ms");
}
raiseNotification();
if (startTime == null)
@ -83,7 +83,7 @@ public class TracingPowerManager
}
public void acquire()
{
synchronized(wakeLock)
synchronized (wakeLock)
{
wakeLock.acquire();
}
@ -91,7 +91,7 @@ public class TracingPowerManager
if (K9.DEBUG)
{
Log.w(K9.LOG_TAG, "Acquired TracingWakeLock for tag " + tag + " and id " + id
+ " with no timeout. K-9 Mail should not do this");
+ " with no timeout. K-9 Mail should not do this");
}
if (startTime == null)
{
@ -101,7 +101,7 @@ public class TracingPowerManager
}
public void setReferenceCounted(boolean counted)
{
synchronized(wakeLock)
synchronized (wakeLock)
{
wakeLock.setReferenceCounted(counted);
}
@ -114,7 +114,7 @@ public class TracingPowerManager
if (K9.DEBUG)
{
Log.v(K9.LOG_TAG, "Releasing TracingWakeLock for tag " + tag + " and id " + id + " after "
+ (endTime - startTime) + " ms, timeout = " + timeout + " ms");
+ (endTime - startTime) + " ms, timeout = " + timeout + " ms");
}
}
else
@ -125,7 +125,7 @@ public class TracingPowerManager
}
}
cancelNotification();
synchronized(wakeLock)
synchronized (wakeLock)
{
wakeLock.release();
}
@ -135,7 +135,7 @@ public class TracingPowerManager
{
if (timer != null)
{
synchronized(timer)
synchronized (timer)
{
if (timerTask != null)
{
@ -148,7 +148,7 @@ public class TracingPowerManager
{
if (timer != null)
{
synchronized(timer)
synchronized (timer)
{
if (timerTask != null)
{
@ -164,7 +164,7 @@ public class TracingPowerManager
{
Long endTime = System.currentTimeMillis();
Log.i(K9.LOG_TAG, "TracingWakeLock for tag " + tag + " and id " + id + " has been active for "
+ (endTime - startTime) + " ms, timeout = " + timeout + " ms");
+ (endTime - startTime) + " ms, timeout = " + timeout + " ms");
}
else

View File

@ -134,7 +134,7 @@ public abstract class Folder
MessageRetrievalListener listener) throws MessagingException;
public void fetchPart(Message message, Part part,
MessageRetrievalListener listener) throws MessagingException
MessageRetrievalListener listener) throws MessagingException
{
throw new RuntimeException("fetchPart() not implemented.");
}

View File

@ -388,16 +388,16 @@ public class MimeMessage extends Message
final int originalLength = references.length();
if (originalLength >= limit)
{
// Find start of first reference
final int start = references.indexOf('<');
// Find start of first reference
final int start = references.indexOf('<');
// First reference + SPACE
// First reference + SPACE
final String firstReference = references.substring(start,
references.indexOf('<', start + 1));
references.indexOf('<', start + 1));
// Find longest tail
final String tail = references.substring(references.indexOf('<',
firstReference.length() + originalLength - limit));
firstReference.length() + originalLength - limit));
references = firstReference + tail;
}

View File

@ -672,6 +672,6 @@ public class ImapResponseParser
* complete IMAP response has been parsed.
*/
public Object foundLiteral(ImapResponse response, FixedLengthInputStream literal)
throws IOException, Exception;
throws IOException, Exception;
}
}

View File

@ -1263,7 +1263,7 @@ public class ImapStore extends Store
@Override
public void fetchPart(Message message, Part part, MessageRetrievalListener listener)
throws MessagingException
throws MessagingException
{
checkOpen();
@ -1287,8 +1287,8 @@ public class ImapStore extends Store
try
{
mConnection.sendCommand(
String.format("UID FETCH %s (UID %s)", message.getUid(), fetch),
false);
String.format("UID FETCH %s (UID %s)", message.getUid(), fetch),
false);
ImapResponse response;
int messageNumber = 0;
@ -1335,7 +1335,7 @@ public class ImapStore extends Store
InputStream bodyStream = new ByteArrayInputStream(bodyString.getBytes());
String contentTransferEncoding = part.getHeader(
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
part.setBody(MimeUtility.decodeBody(bodyStream, contentTransferEncoding));
}
else
@ -2914,7 +2914,7 @@ public class ImapStore extends Store
}
if (K9.DEBUG)
Log.i(K9.LOG_TAG, "About to IDLE for " + getLogId());
Log.i(K9.LOG_TAG, "About to IDLE for " + getLogId());
receiver.setPushActive(getName(), true);
idling.set(true);
@ -3515,7 +3515,7 @@ public class ImapStore extends Store
@Override
public Object foundLiteral(ImapResponse response,
FixedLengthInputStream literal) throws IOException, Exception
FixedLengthInputStream literal) throws IOException, Exception
{
if (response.mTag == null &&
ImapResponseParser.equalsIgnoreCase(response.get(1), "FETCH"))
@ -3544,7 +3544,7 @@ public class ImapStore extends Store
@Override
public Object foundLiteral(ImapResponse response,
FixedLengthInputStream literal) throws IOException, Exception
FixedLengthInputStream literal) throws IOException, Exception
{
if (response.mTag == null &&
ImapResponseParser.equalsIgnoreCase(response.get(1), "FETCH"))
@ -3552,7 +3552,7 @@ public class ImapStore extends Store
//TODO: check for correct UID
String contentTransferEncoding = mPart.getHeader(
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
MimeHeader.HEADER_CONTENT_TRANSFER_ENCODING)[0];
return MimeUtility.decodeBody(literal, contentTransferEncoding);
}

View File

@ -655,7 +655,8 @@ public class LocalStore extends Store implements Serializable
boolean anyAdded = false;
String likeString = "%"+queryString+"%";
whereClause.append(" AND (");
for (String queryField : queryFields) {
for (String queryField : queryFields)
{
if (anyAdded == true)
{
@ -1930,7 +1931,7 @@ public class LocalStore extends Store implements Serializable
appendedFlags.add(Flag.X_GOT_ALL_HEADERS);
mDb.execSQL("UPDATE messages " + "SET flags = ? " + " WHERE id = ?", new Object[]
{ Utility.combine(appendedFlags.toArray(), ',').toUpperCase(), id } );
{ Utility.combine(appendedFlags.toArray(), ',').toUpperCase(), id });
}
}
@ -2778,7 +2779,8 @@ public class LocalStore extends Store implements Serializable
}
@Override
public Set<String> getHeaderNames() {
public Set<String> getHeaderNames()
{
if (!mHeadersLoaded)
loadHeaders();
return super.getHeaderNames();

View File

@ -93,7 +93,7 @@ public class SleepService extends CoreService
else
{
if (K9.DEBUG)
Log.d(K9.LOG_TAG, "SleepService requested sleep time was " + sleepTime + ", actual was " + actualSleep);
Log.d(K9.LOG_TAG, "SleepService requested sleep time was " + sleepTime + ", actual was " + actualSleep);
}
}