Don't allow undo for deletions in trash

Bug: 6282899
Change-Id: I23d0c768a71e08d493f42ee2c8b08ae95dbc1cf4
This commit is contained in:
Marc Blank 2012-05-25 10:50:23 -07:00
parent d4937049b2
commit 28d2fb96f1

View File

@ -2492,6 +2492,13 @@ outer:
values.put(UIProvider.FolderColumns.CAPABILITIES, caps);
}
}
// For trash, we don't allow undo
if (mailbox.mType == Mailbox.TYPE_TRASH) {
values.put(UIProvider.FolderColumns.CAPABILITIES,
UIProvider.FolderCapabilities.CAN_ACCEPT_MOVED_MESSAGES |
UIProvider.FolderCapabilities.CAN_HOLD_MAIL |
UIProvider.FolderCapabilities.DELETE_ACTION_FINAL);
}
}
StringBuilder sb = genSelect(sFolderListMap, uiProjection, values);
sb.append(" FROM " + Mailbox.TABLE_NAME + " WHERE " + MailboxColumns.ID + "=?");