diff --git a/src/com/android/exchange/adapter/CalendarSyncAdapter.java b/src/com/android/exchange/adapter/CalendarSyncAdapter.java index f418309d2..12ff7e11f 100644 --- a/src/com/android/exchange/adapter/CalendarSyncAdapter.java +++ b/src/com/android/exchange/adapter/CalendarSyncAdapter.java @@ -1552,6 +1552,15 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter { (getInt(exValues, Events.STATUS) == Events.STATUS_CANCELED)) { flag = Message.FLAG_OUTGOING_MEETING_CANCEL; + if (!selfOrganizer) { + // Send a cancellation notice to the organizer + // Since CalendarProvider2 sets the organizer of exceptions + // to the user, we have to reset it first to the original + // organizer + exValues.put(Events.ORGANIZER, + entityValues.getAsString(Events.ORGANIZER)); + sendDeclinedEmail(exEntity, clientId); + } } else { flag = Message.FLAG_OUTGOING_MEETING_INVITE; } @@ -1573,28 +1582,6 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter { entityValues.getAsString(Events.EVENT_LOCATION)); } - if ((getInt(exValues, Events.DELETED) == 1) || - (getInt(exValues, Events.STATUS) == - Events.STATUS_CANCELED)) { - // Add the eventId of the exception to the proper list, so that - // the dirty bit is cleared or the event is deleted after the - // sync has completed - mDeletedIdList.add(exEventId); - flag = Message.FLAG_OUTGOING_MEETING_CANCEL; - if (!selfOrganizer) { - // Send a cancellation notice to the organizer - // Since CalendarProvider2 sets the organizer of exceptions - // to the user, we have to reset it first to the original - // organizer - exValues.put(Events.ORGANIZER, - entityValues.getAsString(Events.ORGANIZER)); - sendDeclinedEmail(exEntity, clientId); - } - } else { - mUploadedIdList.add(exEventId); - flag = Message.FLAG_OUTGOING_MEETING_INVITE; - } - if (selfOrganizer) { Message msg = CalendarUtilities.createMessageForEntity(mContext,