com.fsck.k9.mail.Message.setFlag()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(240)

本文整理了Java中com.fsck.k9.mail.Message.setFlag()方法的一些代码示例,展示了Message.setFlag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setFlag()方法的具体详情如下:
包路径:com.fsck.k9.mail.Message
类名称:Message
方法名:setFlag

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;
}

相关文章