本文整理了Java中com.fsck.k9.mail.Message.setFlag()
方法的一些代码示例,展示了Message.setFlag()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setFlag()
方法的具体详情如下:
包路径:com.fsck.k9.mail.Message
类名称:Message
方法名:setFlag
暂无
代码示例来源:origin: k9mail/k-9
/**
* This method calls setFlag(Flag, boolean)
* @param flags
* @param set
*/
public void setFlags(final Set<Flag> flags, boolean set) throws MessagingException {
for (Flag flag : flags) {
setFlag(flag, set);
}
}
代码示例来源:origin: k9mail/k-9
private void handleSendFailure(Account account, Folder localFolder, Message message, Exception exception)
throws MessagingException {
Timber.e(exception, "Failed to send message");
message.setFlag(Flag.X_SEND_FAILED, true);
notifySynchronizeMailboxFailed(account, localFolder, exception);
}
代码示例来源:origin: k9mail/k-9
void processPendingMarkAllAsRead(PendingMarkAllAsRead command, Account account) throws MessagingException {
String folder = command.folder;
LocalFolder localFolder = null;
try {
LocalStore localStore = localStoreProvider.getInstance(account);
localFolder = localStore.getFolder(folder);
localFolder.open(Folder.OPEN_MODE_RW);
List<? extends Message> messages = localFolder.getMessages(null, false);
for (Message message : messages) {
if (!message.isSet(Flag.SEEN)) {
message.setFlag(Flag.SEEN, true);
}
}
for (MessagingListener l : getListeners()) {
l.folderStatusChanged(account, folder, 0);
}
} finally {
closeFolder(localFolder);
}
Backend backend = getBackend(account);
if (backend.getSupportsSeenFlag()) {
backend.markAllAsRead(folder);
}
}
代码示例来源:origin: jberkel/sms-backup-plus
public @NonNull ConversionResult convertMessages(final Cursor cursor, DataType dataType)
throws MessagingException {
final Map<String, String> msgMap = getMessageMap(cursor);
final Message m = messageGenerator.messageForDataType(msgMap, dataType);
final ConversionResult result = new ConversionResult(dataType);
if (m != null) {
m.setFlag(Flag.SEEN, markAsSeen(dataType, msgMap));
result.add(m, msgMap);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!