Merge commit '6ba40085d7519681c140cbcacdecd4636bfc4ce3' into eclair-mr2-plus-aosp * commit '6ba40085d7519681c140cbcacdecd4636bfc4ce3': Handle "send outgoing messages" properly for combined Outbox
This commit is contained in:
commit
7d5839da5a
@ -605,9 +605,23 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onSendPendingMessages() {
|
private void onSendPendingMessages() {
|
||||||
|
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);
|
long accountId = lookupAccountIdFromMailboxId(mMailboxId);
|
||||||
mController.sendPendingMessages(accountId, mControllerCallback);
|
mController.sendPendingMessages(accountId, mControllerCallback);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onDelete(long messageId, long accountId) {
|
private void onDelete(long messageId, long accountId) {
|
||||||
mController.deleteMessage(messageId, accountId);
|
mController.deleteMessage(messageId, accountId);
|
||||||
|
Loading…
Reference in New Issue
Block a user