|
|
@ -4454,19 +4454,12 @@ public class MessageHelper {
|
|
|
|
else if (method == null || method.isRequest() || method.isReply()) {
|
|
|
|
else if (method == null || method.isRequest() || method.isReply()) {
|
|
|
|
int status = CalendarContract.Events.STATUS_TENTATIVE;
|
|
|
|
int status = CalendarContract.Events.STATUS_TENTATIVE;
|
|
|
|
if (method != null && method.isReply()) {
|
|
|
|
if (method != null && method.isReply()) {
|
|
|
|
List<Address> recipients = new ArrayList<>();
|
|
|
|
|
|
|
|
if (message.to != null)
|
|
|
|
|
|
|
|
recipients.addAll(Arrays.asList(message.to));
|
|
|
|
|
|
|
|
if (message.cc != null)
|
|
|
|
|
|
|
|
recipients.addAll(Arrays.asList(message.cc));
|
|
|
|
|
|
|
|
if (message.bcc != null)
|
|
|
|
|
|
|
|
recipients.addAll(Arrays.asList(message.bcc));
|
|
|
|
|
|
|
|
List<Attendee> attendees = event.getAttendees();
|
|
|
|
List<Attendee> attendees = event.getAttendees();
|
|
|
|
if (attendees != null)
|
|
|
|
if (attendees != null && message.to != null)
|
|
|
|
for (Attendee attendee : attendees) {
|
|
|
|
for (Attendee attendee : attendees) {
|
|
|
|
String email = attendee.getEmail();
|
|
|
|
String email = attendee.getEmail();
|
|
|
|
for (Address address : recipients) {
|
|
|
|
for (Address to : message.to) {
|
|
|
|
String recipient = ((InternetAddress) address).getAddress();
|
|
|
|
String recipient = ((InternetAddress) to).getAddress();
|
|
|
|
if (!TextUtils.isEmpty(email) && email.equalsIgnoreCase(recipient)) {
|
|
|
|
if (!TextUtils.isEmpty(email) && email.equalsIgnoreCase(recipient)) {
|
|
|
|
ParticipationStatus pstatus = attendee.getParticipationStatus();
|
|
|
|
ParticipationStatus pstatus = attendee.getParticipationStatus();
|
|
|
|
if (ParticipationStatus.ACCEPTED.equals(pstatus))
|
|
|
|
if (ParticipationStatus.ACCEPTED.equals(pstatus))
|
|
|
|