mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-12 06:08:25 -05:00
code reindenting
This commit is contained in:
parent
59b3c1ba89
commit
04e4dcb187
@ -238,21 +238,15 @@ public class Account implements BaseAccount
|
|||||||
|
|
||||||
SharedPreferences prefs = preferences.getPreferences();
|
SharedPreferences prefs = preferences.getPreferences();
|
||||||
|
|
||||||
mStoreUri = Utility.base64Decode(prefs.getString(mUuid
|
mStoreUri = Utility.base64Decode(prefs.getString(mUuid + ".storeUri", null));
|
||||||
+ ".storeUri", null));
|
|
||||||
mLocalStorageProviderId = prefs.getString(mUuid + ".localStorageProvider", StorageManager.getInstance(K9.app).getDefaultProviderId());
|
mLocalStorageProviderId = prefs.getString(mUuid + ".localStorageProvider", StorageManager.getInstance(K9.app).getDefaultProviderId());
|
||||||
mTransportUri = Utility.base64Decode(prefs.getString(mUuid
|
mTransportUri = Utility.base64Decode(prefs.getString(mUuid + ".transportUri", null));
|
||||||
+ ".transportUri", null));
|
|
||||||
mDescription = prefs.getString(mUuid + ".description", null);
|
mDescription = prefs.getString(mUuid + ".description", null);
|
||||||
mAlwaysBcc = prefs.getString(mUuid + ".alwaysBcc", mAlwaysBcc);
|
mAlwaysBcc = prefs.getString(mUuid + ".alwaysBcc", mAlwaysBcc);
|
||||||
mAutomaticCheckIntervalMinutes = prefs.getInt(mUuid
|
mAutomaticCheckIntervalMinutes = prefs.getInt(mUuid + ".automaticCheckIntervalMinutes", -1);
|
||||||
+ ".automaticCheckIntervalMinutes", -1);
|
mIdleRefreshMinutes = prefs.getInt(mUuid + ".idleRefreshMinutes", 24);
|
||||||
mIdleRefreshMinutes = prefs.getInt(mUuid
|
mSaveAllHeaders = prefs.getBoolean(mUuid + ".saveAllHeaders", true);
|
||||||
+ ".idleRefreshMinutes", 24);
|
mPushPollOnConnect = prefs.getBoolean(mUuid + ".pushPollOnConnect", true);
|
||||||
mSaveAllHeaders = prefs.getBoolean(mUuid
|
|
||||||
+ ".saveAllHeaders", true);
|
|
||||||
mPushPollOnConnect = prefs.getBoolean(mUuid
|
|
||||||
+ ".pushPollOnConnect", true);
|
|
||||||
mDisplayCount = prefs.getInt(mUuid + ".displayCount", K9.DEFAULT_VISIBLE_LIMIT);
|
mDisplayCount = prefs.getInt(mUuid + ".displayCount", K9.DEFAULT_VISIBLE_LIMIT);
|
||||||
if (mDisplayCount < 0)
|
if (mDisplayCount < 0)
|
||||||
{
|
{
|
||||||
@ -264,31 +258,21 @@ public class Account implements BaseAccount
|
|||||||
mNotifySelfNewMail = prefs.getBoolean(mUuid + ".notifySelfNewMail", true);
|
mNotifySelfNewMail = prefs.getBoolean(mUuid + ".notifySelfNewMail", true);
|
||||||
mNotifySync = prefs.getBoolean(mUuid + ".notifyMailCheck", false);
|
mNotifySync = prefs.getBoolean(mUuid + ".notifyMailCheck", false);
|
||||||
mDeletePolicy = prefs.getInt(mUuid + ".deletePolicy", 0);
|
mDeletePolicy = prefs.getInt(mUuid + ".deletePolicy", 0);
|
||||||
mDraftsFolderName = prefs.getString(mUuid + ".draftsFolderName",
|
mDraftsFolderName = prefs.getString(mUuid + ".draftsFolderName", "Drafts");
|
||||||
"Drafts");
|
mSentFolderName = prefs.getString(mUuid + ".sentFolderName", "Sent");
|
||||||
mSentFolderName = prefs.getString(mUuid + ".sentFolderName",
|
mTrashFolderName = prefs.getString(mUuid + ".trashFolderName", "Trash");
|
||||||
"Sent");
|
mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName", "Archive");
|
||||||
mTrashFolderName = prefs.getString(mUuid + ".trashFolderName",
|
mSpamFolderName = prefs.getString(mUuid + ".spamFolderName", "Spam");
|
||||||
"Trash");
|
mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName", "Outbox");
|
||||||
mArchiveFolderName = prefs.getString(mUuid + ".archiveFolderName",
|
|
||||||
"Archive");
|
|
||||||
mSpamFolderName = prefs.getString(mUuid + ".spamFolderName",
|
|
||||||
"Spam");
|
|
||||||
mOutboxFolderName = prefs.getString(mUuid + ".outboxFolderName",
|
|
||||||
"Outbox");
|
|
||||||
mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY);
|
mExpungePolicy = prefs.getString(mUuid + ".expungePolicy", EXPUNGE_IMMEDIATELY);
|
||||||
mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true);
|
mSyncRemoteDeletions = prefs.getBoolean(mUuid + ".syncRemoteDeletions", true);
|
||||||
|
|
||||||
mMaxPushFolders = prefs.getInt(mUuid + ".maxPushFolders", 10);
|
mMaxPushFolders = prefs.getInt(mUuid + ".maxPushFolders", 10);
|
||||||
goToUnreadMessageSearch = prefs.getBoolean(mUuid + ".goToUnreadMessageSearch",
|
goToUnreadMessageSearch = prefs.getBoolean(mUuid + ".goToUnreadMessageSearch", false);
|
||||||
false);
|
|
||||||
mNotificationShowsUnreadCount = prefs.getBoolean(mUuid + ".notificationUnreadCount", true);
|
mNotificationShowsUnreadCount = prefs.getBoolean(mUuid + ".notificationUnreadCount", true);
|
||||||
subscribedFoldersOnly = prefs.getBoolean(mUuid + ".subscribedFoldersOnly",
|
subscribedFoldersOnly = prefs.getBoolean(mUuid + ".subscribedFoldersOnly", false);
|
||||||
false);
|
maximumPolledMessageAge = prefs.getInt(mUuid + ".maximumPolledMessageAge", -1);
|
||||||
maximumPolledMessageAge = prefs.getInt(mUuid
|
maximumAutoDownloadMessageSize = prefs.getInt(mUuid + ".maximumAutoDownloadMessageSize", 32768);
|
||||||
+ ".maximumPolledMessageAge", -1);
|
|
||||||
maximumAutoDownloadMessageSize = prefs.getInt(mUuid
|
|
||||||
+ ".maximumAutoDownloadMessageSize", 32768);
|
|
||||||
mMessageFormat = MessageFormat.valueOf(prefs.getString(mUuid + ".messageFormat", DEFAULT_MESSAGE_FORMAT.name()));
|
mMessageFormat = MessageFormat.valueOf(prefs.getString(mUuid + ".messageFormat", DEFAULT_MESSAGE_FORMAT.name()));
|
||||||
mQuoteStyle = QuoteStyle.valueOf(prefs.getString(mUuid + ".quoteStyle", DEFAULT_QUOTE_STYLE.name()));
|
mQuoteStyle = QuoteStyle.valueOf(prefs.getString(mUuid + ".quoteStyle", DEFAULT_QUOTE_STYLE.name()));
|
||||||
mQuotePrefix = prefs.getString(mUuid + ".quotePrefix", DEFAULT_QUOTE_PREFIX);
|
mQuotePrefix = prefs.getString(mUuid + ".quotePrefix", DEFAULT_QUOTE_PREFIX);
|
||||||
|
@ -1022,8 +1022,7 @@ public class MessagingController implements Runnable
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.d(K9.LOG_TAG, "SYNC: About to process pending commands for account " +
|
Log.d(K9.LOG_TAG, "SYNC: About to process pending commands for account " + account.getDescription());
|
||||||
account.getDescription());
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -1060,7 +1059,6 @@ public class MessagingController implements Runnable
|
|||||||
{
|
{
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.v(K9.LOG_TAG, "SYNC: using providedRemoteFolder " + folder);
|
Log.v(K9.LOG_TAG, "SYNC: using providedRemoteFolder " + folder);
|
||||||
|
|
||||||
remoteFolder = providedRemoteFolder;
|
remoteFolder = providedRemoteFolder;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1071,9 +1069,7 @@ public class MessagingController implements Runnable
|
|||||||
Log.v(K9.LOG_TAG, "SYNC: About to get remote folder " + folder);
|
Log.v(K9.LOG_TAG, "SYNC: About to get remote folder " + folder);
|
||||||
remoteFolder = remoteStore.getFolder(folder);
|
remoteFolder = remoteStore.getFolder(folder);
|
||||||
|
|
||||||
|
if (! verifyOrCreateRemoteSpecialFolder(account, folder, remoteFolder, listener))
|
||||||
|
|
||||||
if (! verifyOrCreateRemoteSpecialFolder(account, folder, remoteFolder, listener))
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1081,6 +1077,7 @@ public class MessagingController implements Runnable
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Synchronization process:
|
* Synchronization process:
|
||||||
|
*
|
||||||
Open the folder
|
Open the folder
|
||||||
Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash)
|
Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash)
|
||||||
Get the message count
|
Get the message count
|
||||||
@ -1088,12 +1085,10 @@ public class MessagingController implements Runnable
|
|||||||
getMessages(messageCount - K9.DEFAULT_VISIBLE_LIMIT, messageCount)
|
getMessages(messageCount - K9.DEFAULT_VISIBLE_LIMIT, messageCount)
|
||||||
See if we have each message locally, if not fetch it's flags and envelope
|
See if we have each message locally, if not fetch it's flags and envelope
|
||||||
Get and update the unread count for the folder
|
Get and update the unread count for the folder
|
||||||
Update the remote flags of any messages we have locally with an internal date
|
Update the remote flags of any messages we have locally with an internal date newer than the remote message.
|
||||||
newer than the remote message.
|
|
||||||
Get the current flags for any messages we have locally but did not just download
|
Get the current flags for any messages we have locally but did not just download
|
||||||
Update local flags
|
Update local flags
|
||||||
For any message we have locally but not remotely, delete the local message to keep
|
For any message we have locally but not remotely, delete the local message to keep cache clean.
|
||||||
cache clean.
|
|
||||||
Download larger parts of any new messages.
|
Download larger parts of any new messages.
|
||||||
(Optional) Download small attachments in the background.
|
(Optional) Download small attachments in the background.
|
||||||
*/
|
*/
|
||||||
@ -1109,8 +1104,6 @@ public class MessagingController implements Runnable
|
|||||||
{
|
{
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.d(K9.LOG_TAG, "SYNC: Expunging folder " + account.getDescription() + ":" + folder);
|
Log.d(K9.LOG_TAG, "SYNC: Expunging folder " + account.getDescription() + ":" + folder);
|
||||||
|
|
||||||
|
|
||||||
remoteFolder.expunge();
|
remoteFolder.expunge();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1130,17 +1123,16 @@ public class MessagingController implements Runnable
|
|||||||
|
|
||||||
Message[] remoteMessageArray = EMPTY_MESSAGE_ARRAY;
|
Message[] remoteMessageArray = EMPTY_MESSAGE_ARRAY;
|
||||||
final ArrayList<Message> remoteMessages = new ArrayList<Message>();
|
final ArrayList<Message> remoteMessages = new ArrayList<Message>();
|
||||||
// final ArrayList<Message> unsyncedMessages = new ArrayList<Message>();
|
|
||||||
HashMap<String, Message> remoteUidMap = new HashMap<String, Message>();
|
HashMap<String, Message> remoteUidMap = new HashMap<String, Message>();
|
||||||
|
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.v(K9.LOG_TAG, "SYNC: Remote message count for folder " + folder + " is " + remoteMessageCount);
|
Log.v(K9.LOG_TAG, "SYNC: Remote message count for folder " + folder + " is " + remoteMessageCount);
|
||||||
final Date earliestDate = account.getEarliestPollDate();
|
final Date earliestDate = account.getEarliestPollDate();
|
||||||
|
|
||||||
|
|
||||||
if (remoteMessageCount > 0)
|
if (remoteMessageCount > 0)
|
||||||
{
|
{
|
||||||
/*
|
/* Message numbers start at 1. */
|
||||||
* Message numbers start at 1.
|
|
||||||
*/
|
|
||||||
int remoteStart;
|
int remoteStart;
|
||||||
if (visibleLimit > 0 )
|
if (visibleLimit > 0 )
|
||||||
{
|
{
|
||||||
@ -1229,17 +1221,14 @@ public class MessagingController implements Runnable
|
|||||||
l.folderStatusChanged(account, folder, unreadMessageCount);
|
l.folderStatusChanged(account, folder, unreadMessageCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* Notify listeners that we're finally done. */
|
||||||
* Notify listeners that we're finally done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
localFolder.setLastChecked(System.currentTimeMillis());
|
localFolder.setLastChecked(System.currentTimeMillis());
|
||||||
localFolder.setStatus(null);
|
localFolder.setStatus(null);
|
||||||
|
|
||||||
if (K9.DEBUG)
|
if (K9.DEBUG)
|
||||||
Log.d(K9.LOG_TAG, "Done synchronizing folder " +
|
Log.d(K9.LOG_TAG, "Done synchronizing folder " + account.getDescription() + ":" + folder +
|
||||||
account.getDescription() + ":" + folder + " @ " + new Date() +
|
" @ " + new Date() + " with " + newMessages + " new messages");
|
||||||
" with " + newMessages + " new messages");
|
|
||||||
|
|
||||||
for (MessagingListener l : getListeners(listener))
|
for (MessagingListener l : getListeners(listener))
|
||||||
{
|
{
|
||||||
@ -1285,14 +1274,10 @@ public class MessagingController implements Runnable
|
|||||||
|
|
||||||
for (MessagingListener l : getListeners(listener))
|
for (MessagingListener l : getListeners(listener))
|
||||||
{
|
{
|
||||||
l.synchronizeMailboxFailed(
|
l.synchronizeMailboxFailed( account, folder, rootMessage);
|
||||||
account,
|
|
||||||
folder,
|
|
||||||
rootMessage);
|
|
||||||
}
|
}
|
||||||
addErrorMessage(account, null, e);
|
addErrorMessage(account, null, e);
|
||||||
Log.e(K9.LOG_TAG, "Failed synchronizing folder " +
|
Log.e(K9.LOG_TAG, "Failed synchronizing folder " + account.getDescription() + ":" + folder + " @ " + new Date());
|
||||||
account.getDescription() + ":" + folder + " @ " + new Date());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -1052,7 +1052,7 @@ public class Pop3Store extends Store
|
|||||||
public boolean supportsFetchingFlags()
|
public boolean supportsFetchingFlags()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}//isFlagSupported
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o)
|
public boolean equals(Object o)
|
||||||
|
Loading…
Reference in New Issue
Block a user