am 1205deec: am 627006a8: Fix issue with deleted recurrence

Merge commit '1205deececdb99a23b45434568fac71fe3d50b8f' into kraken

* commit '1205deececdb99a23b45434568fac71fe3d50b8f':
  Fix issue with deleted recurrence
This commit is contained in:
Marc Blank 2010-04-14 08:39:13 -07:00 committed by Android Git Automerger
commit 3180ada550

View File

@ -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,