本文整理了Java中com.fsck.k9.mail.Message.getSentDate()
方法的一些代码示例,展示了Message.getSentDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getSentDate()
方法的具体详情如下:
包路径:com.fsck.k9.mail.Message
类名称:Message
方法名:getSentDate
暂无
代码示例来源:origin: k9mail/k-9
public boolean olderThan(Date earliestDate) {
if (earliestDate == null) {
return false;
}
Date myDate = getSentDate();
if (myDate == null) {
myDate = getInternalDate();
}
return myDate != null && myDate.before(earliestDate);
}
代码示例来源:origin: k9mail/k-9
@Nullable
private Bundle createGossipUpdateBundle(Message message, MimeBodyPart decryptedPart) {
List<String> gossipAcceptedAddresses = getGossipAcceptedAddresses(message);
if (gossipAcceptedAddresses.isEmpty()) {
return null;
}
List<AutocryptGossipHeader> autocryptGossipHeaders =
autocryptGossipHeaderParser.getAllAutocryptGossipHeaders(decryptedPart);
if (autocryptGossipHeaders.isEmpty()) {
return null;
}
Date messageDate = message.getSentDate();
Date internalDate = message.getInternalDate();
Date effectiveDate = messageDate.before(internalDate) ? messageDate : internalDate;
return createGossipUpdateBundle(gossipAcceptedAddresses, autocryptGossipHeaders, effectiveDate);
}
代码示例来源:origin: k9mail/k-9
public boolean addAutocryptPeerUpdateToIntentIfPresent(Message currentMessage, Intent intent) {
AutocryptHeader autocryptHeader = autocryptHeaderParser.getValidAutocryptHeader(currentMessage);
if (autocryptHeader == null) {
return false;
}
String messageFromAddress = currentMessage.getFrom()[0].getAddress();
if (!autocryptHeader.addr.equalsIgnoreCase(messageFromAddress)) {
return false;
}
Date messageDate = currentMessage.getSentDate();
Date internalDate = currentMessage.getInternalDate();
Date effectiveDate = messageDate.before(internalDate) ? messageDate : internalDate;
AutocryptPeerUpdate data = AutocryptPeerUpdate.create(
autocryptHeader.keyData, effectiveDate, autocryptHeader.isPreferEncryptMutual);
intent.putExtra(OpenPgpApi.EXTRA_AUTOCRYPT_PEER_ID, messageFromAddress);
intent.putExtra(OpenPgpApi.EXTRA_AUTOCRYPT_PEER_UPDATE, data);
return true;
}
代码示例来源:origin: k9mail/k-9
Date date = message.getSentDate();
if (date != null) {
text.append(resourceProvider.messageHeaderDate());
代码示例来源:origin: k9mail/k-9
cv.put("subject", message.getSubject());
cv.put("sender_list", Address.pack(message.getFrom()));
cv.put("date", message.getSentDate() == null
? System.currentTimeMillis() : message.getSentDate().getTime());
cv.put("flags", LocalStore.serializeFlags(message.getFlags()));
cv.put("deleted", message.isSet(Flag.DELETED) ? 1 : 0);
代码示例来源:origin: jberkel/sms-backup-plus
public int compare(final Message m1, final Message m2) {
final Date d1 = m1 == null ? EARLY : m1.getSentDate() != null ? m1.getSentDate() : EARLY;
final Date d2 = m2 == null ? EARLY : m2.getSentDate() != null ? m2.getSentDate() : EARLY;
return d2.compareTo(d1);
}
}
代码示例来源:origin: k9mail/k-9
message.getSentDate().getTime(),
DateUtils.FORMAT_SHOW_DATE
| DateUtils.FORMAT_ABBREV_ALL
代码示例来源:origin: k9mail/k-9
Date date = message.getSentDate();
if (date != null) {
addTableRow(html, resourceProvider.messageHeaderDate(),
代码示例来源:origin: jberkel/sms-backup-plus
@Test public void testShouldGenerateStandardHeaders() throws Exception {
Message message = new MimeMessage();
Map<String, String> map = new HashMap<String, String>();
Date sent = new Date();
PersonRecord person = new PersonRecord(0, null, null, null);
generator.setHeaders(message, map, DataType.SMS, "1234", person, sent, 0);
assertThat(get(message, Headers.ADDRESS)).isEqualTo("1234");
assertThat(get(message, Headers.DATATYPE)).isEqualTo("SMS");
assertThat(get(message, Headers.BACKUP_TIME)).isNotEmpty();
assertThat(get(message, Headers.VERSION)).isNotEmpty();
assertThat(message.getMessageId()).contains("sms-backup-plus.local");
assertThat(message.getSentDate()).isEqualTo(sent);
assertThat(message.getReferences()).isNotEmpty();
}
内容来源于网络,如有侵权,请联系作者删除!