mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
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:
parent
b51bce6ebf
commit
ecebdf18cd
@ -193,7 +193,7 @@ public class Account implements BaseAccount
|
||||
|
||||
mMaxPushFolders = preferences.getPreferences().getInt(mUuid + ".maxPushFolders", 10);
|
||||
goToUnreadMessageSearch = preferences.getPreferences().getBoolean(mUuid + ".goToUnreadMessageSearch",
|
||||
true);
|
||||
true);
|
||||
for (String type : networkTypes)
|
||||
{
|
||||
Boolean useCompression = preferences.getPreferences().getBoolean(mUuid + ".useCompression." + type,
|
||||
|
@ -1063,7 +1063,7 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if (K9.DEBUG)
|
||||
Log.v(K9.LOG_TAG, "SYNC: About to get remote store for " + folder);
|
||||
|
||||
@ -1097,36 +1097,36 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
if (K9.DEBUG)
|
||||
Log.i(K9.LOG_TAG, "Done synchronizing folder " + folder);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Synchronization process:
|
||||
Open the folder
|
||||
Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash)
|
||||
Get the message count
|
||||
Get the list of the newest K9.DEFAULT_VISIBLE_LIMIT messages
|
||||
getMessages(messageCount - K9.DEFAULT_VISIBLE_LIMIT, messageCount)
|
||||
See if we have each message locally, if not fetch it's flags and envelope
|
||||
Get and update the unread count for the folder
|
||||
Update the remote flags of any messages we have locally with an internal date
|
||||
newer than the remote message.
|
||||
Get the current flags for any messages we have locally but did not just download
|
||||
Update local flags
|
||||
For any message we have locally but not remotely, delete the local message to keep
|
||||
cache clean.
|
||||
Download larger parts of any new messages.
|
||||
(Optional) Download small attachments in the background.
|
||||
*/
|
||||
/*
|
||||
* Synchronization process:
|
||||
Open the folder
|
||||
Upload any local messages that are marked as PENDING_UPLOAD (Drafts, Sent, Trash)
|
||||
Get the message count
|
||||
Get the list of the newest K9.DEFAULT_VISIBLE_LIMIT messages
|
||||
getMessages(messageCount - K9.DEFAULT_VISIBLE_LIMIT, messageCount)
|
||||
See if we have each message locally, if not fetch it's flags and envelope
|
||||
Get and update the unread count for the folder
|
||||
Update the remote flags of any messages we have locally with an internal date
|
||||
newer than the remote message.
|
||||
Get the current flags for any messages we have locally but did not just download
|
||||
Update local flags
|
||||
For any message we have locally but not remotely, delete the local message to keep
|
||||
cache clean.
|
||||
Download larger parts of any new messages.
|
||||
(Optional) Download small attachments in the background.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Open the remote folder. This pre-loads certain metadata like message count.
|
||||
*/
|
||||
/*
|
||||
* Open the remote folder. This pre-loads certain metadata like message count.
|
||||
*/
|
||||
if (K9.DEBUG)
|
||||
Log.v(K9.LOG_TAG, "SYNC: About to open remote folder " + folder);
|
||||
|
||||
|
||||
remoteFolder.open(OpenMode.READ_WRITE);
|
||||
}
|
||||
if (Account.EXPUNGE_ON_POLL.equals(account.getExpungePolicy()))
|
||||
@ -1775,7 +1775,7 @@ public class MessagingController implements Runnable
|
||||
|
||||
fp.clear();
|
||||
fp.add(FetchProfile.Item.FLAGS);
|
||||
|
||||
|
||||
List<Message> undeletedMessages = new LinkedList<Message>();
|
||||
for (Message message : syncFlagMessages)
|
||||
{
|
||||
@ -1784,7 +1784,7 @@ public class MessagingController implements Runnable
|
||||
undeletedMessages.add(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
remoteFolder.fetch(undeletedMessages.toArray(new Message[0]), fp, null);
|
||||
for (Message remoteMessage : syncFlagMessages)
|
||||
{
|
||||
@ -4420,7 +4420,7 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void recreate(final Account account, final MessagingListener ml)
|
||||
{
|
||||
putBackground("recreate:" + account.getDescription(), ml, new Runnable()
|
||||
@ -4479,7 +4479,7 @@ public class MessagingController implements Runnable
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Folder folder = message.getFolder();
|
||||
if (folder != null)
|
||||
{
|
||||
@ -4548,7 +4548,7 @@ public class MessagingController implements Runnable
|
||||
messageNotice.append(context.getString(R.string.notification_new_title));
|
||||
}
|
||||
|
||||
|
||||
|
||||
NotificationManager notifMgr =
|
||||
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
Notification notif = new Notification(R.drawable.stat_notify_email_generic, messageNotice, System.currentTimeMillis());
|
||||
|
@ -590,7 +590,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
})
|
||||
.create();
|
||||
}
|
||||
|
||||
|
||||
private Dialog createClearAccountDialog()
|
||||
{
|
||||
return new AlertDialog.Builder(this)
|
||||
@ -619,7 +619,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
})
|
||||
.create();
|
||||
}
|
||||
|
||||
|
||||
private Dialog createRecreateAccountDialog()
|
||||
{
|
||||
return new AlertDialog.Builder(this)
|
||||
@ -708,7 +708,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
private void onClear(Account account)
|
||||
{
|
||||
showDialog(DIALOG_CLEAR_ACCOUNT);
|
||||
|
||||
|
||||
}
|
||||
private void onRecreate(Account account)
|
||||
{
|
||||
|
@ -1493,11 +1493,11 @@ public class FolderList extends K9ListActivity
|
||||
}
|
||||
|
||||
private static Flag[] UNREAD_FLAG_ARRAY = { Flag.SEEN };
|
||||
|
||||
|
||||
private void openUnreadSearch(Context context, final Account account)
|
||||
{
|
||||
String description = getString(R.string.search_title, mAccount.getDescription(), getString(R.string.unread_modifier));
|
||||
|
||||
|
||||
SearchSpecification searchSpec = new SearchSpecification()
|
||||
{
|
||||
@Override
|
||||
@ -1505,37 +1505,37 @@ public class FolderList extends K9ListActivity
|
||||
{
|
||||
return new String[] { account.getUuid() };
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Flag[] getForbiddenFlags()
|
||||
{
|
||||
return UNREAD_FLAG_ARRAY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getQuery()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Flag[] getRequiredFlags()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isIntegrate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String[] getFolderNames()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
MessageList.actionHandle(context, description, searchSpec);
|
||||
}
|
||||
|
@ -304,10 +304,10 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
|
||||
mAccountVibrate = (CheckBoxPreference) findPreference(PREFERENCE_VIBRATE);
|
||||
mAccountVibrate.setChecked(mAccount.isVibrate());
|
||||
|
||||
|
||||
mNotificationOpensUnread = (CheckBoxPreference)findPreference(PREFERENCE_NOTIFICATION_OPENS_UNREAD);
|
||||
mNotificationOpensUnread.setChecked(mAccount.goToUnreadMessageSearch());
|
||||
|
||||
|
||||
|
||||
mAutoExpandFolder = (Preference)findPreference(PREFERENCE_AUTO_EXPAND_FOLDER);
|
||||
|
||||
|
@ -970,7 +970,7 @@ public class ImapStore extends Store
|
||||
};
|
||||
return search(searcher, listener);
|
||||
}
|
||||
|
||||
|
||||
protected Message[] getMessagesFromUids(final List<String> mesgUids, final boolean includeDeleted, final MessageRetrievalListener listener)
|
||||
throws MessagingException
|
||||
{
|
||||
@ -2623,7 +2623,7 @@ public class ImapStore extends Store
|
||||
final AtomicInteger idleFailureCount = new AtomicInteger(0);
|
||||
final AtomicBoolean needsPoll = new AtomicBoolean(false);
|
||||
List<ImapResponse> storedUntaggedResponses = new ArrayList<ImapResponse>();
|
||||
|
||||
|
||||
public ImapFolderPusher(ImapStore store, String name, PushReceiver nReceiver)
|
||||
{
|
||||
super(store, name);
|
||||
@ -2976,11 +2976,11 @@ public class ImapStore extends Store
|
||||
receiver.pushError("Exception while processing Push untagged responses", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void removeMessages(List<String> removeUids)
|
||||
{
|
||||
List<Message> messages = new ArrayList<Message>(removeUids.size());
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
Message[] existingMessages = getMessagesFromUids(removeUids, true, null);
|
||||
@ -3012,7 +3012,7 @@ public class ImapStore extends Store
|
||||
Log.e(K9.LOG_TAG, "Cannot remove EXPUNGEd messages", e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected int processUntaggedResponse(int oldMessageCount, ImapResponse response, List<Integer> flagSyncMsgSeqs, List<String> removeMsgUids)
|
||||
@ -3028,7 +3028,7 @@ public class ImapStore extends Store
|
||||
{
|
||||
Log.i(K9.LOG_TAG, "Got FETCH " + response);
|
||||
int msgSeq = response.getNumber(0);
|
||||
|
||||
|
||||
if (K9.DEBUG)
|
||||
Log.d(K9.LOG_TAG, "Got untagged FETCH for msgseq " + msgSeq + " for " + getLogId());
|
||||
|
||||
@ -3062,8 +3062,8 @@ public class ImapStore extends Store
|
||||
}
|
||||
}
|
||||
flagSyncMsgSeqs.addAll(newSeqs);
|
||||
|
||||
|
||||
|
||||
|
||||
List<Integer> msgSeqs = new ArrayList<Integer>(msgSeqUidMap.keySet());
|
||||
Collections.sort(msgSeqs); // Have to do comparisons in order because of msgSeq reductions
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class LocalStore extends Store implements Serializable
|
||||
openOrCreateDataspace(application);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void openOrCreateDataspace(Application application)
|
||||
{
|
||||
File parentDir = new File(mPath).getParentFile();
|
||||
@ -112,7 +112,7 @@ public class LocalStore extends Store implements Serializable
|
||||
if (mDb.getVersion() != DB_VERSION)
|
||||
{
|
||||
doDbUpgrade(mDb, application);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void doDbUpgrade(SQLiteDatabase mDb, Application application)
|
||||
@ -442,7 +442,7 @@ public class LocalStore extends Store implements Serializable
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void recreate()
|
||||
{
|
||||
delete();
|
||||
|
Loading…
Reference in New Issue
Block a user