am 863e6c40: Handle "send outgoing messages" properly for combined Outbox

Merge commit '863e6c40202fe804d92a263809da74ec1e904e66' into eclair-mr2

* commit '863e6c40202fe804d92a263809da74ec1e904e66':
  Handle "send outgoing messages" properly for combined Outbox
This commit is contained in:
Marc Blank 2009-11-20 09:56:03 -08:00 committed by Android Git Automerger
commit 6ba40085d7

View File

@ -605,8 +605,22 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
}
private void onSendPendingMessages() {
long accountId = lookupAccountIdFromMailboxId(mMailboxId);
mController.sendPendingMessages(accountId, mControllerCallback);
if (mMailboxId == Mailbox.QUERY_ALL_OUTBOX) {
// For the combined Outbox, we loop through all accounts and send the messages
Cursor c = mResolver.query(Account.CONTENT_URI, Account.ID_PROJECTION,
null, null, null);
try {
while (c.moveToNext()) {
long accountId = c.getLong(Account.ID_PROJECTION_COLUMN);
mController.sendPendingMessages(accountId, mControllerCallback);
}
} finally {
c.close();
}
} else {
long accountId = lookupAccountIdFromMailboxId(mMailboxId);
mController.sendPendingMessages(accountId, mControllerCallback);
}
}
private void onDelete(long messageId, long accountId) {