DO NOT MERGE: Interpret "busy" on new events to mean "no response"

* The meaning of a busy status of "Busy" is uncertain; it could mean
  "Accepted" or "Tentative", depending on whether the event was
  created via OWA/Outlook or EAS
* We have interpreted it as "Accepted", which prevents the user from
  actually accepting the event (as a state change is required for us
  to send updates to the server/organizer)
* This CL changes the behavior such that a newly arriving event with
  a "Busy" status is shown as "No response" in the Calendar, thereby
  allowing the user to pick from any of the three possible options.

Bug: 2811859
Change-Id: I321f714e54e66ee8f40f5e2c00587b98bad71a63
This commit is contained in:
Marc Blank 2010-07-02 14:53:11 -07:00
parent c6299fc078
commit 6f207f5df2

View File

@ -598,6 +598,14 @@ public class CalendarSyncAdapter extends AbstractSyncAdapter {
sb.append(attendeeEmail);
sb.append(ATTENDEE_TOKENIZER_DELIMITER);
if (mEmailAddress.equalsIgnoreCase(attendeeEmail)) {
// For new events of a non-organizer, we can't tell whether Busy means
// accepted or not responded; it's safest to set this to Free (which will be
// shown in the UI as "No response"), allowing any setting by the user to
// be uploaded and a reply sent to the organizer
if (!update && !selfOrganizer &&
(busyStatus == CalendarUtilities.BUSY_STATUS_BUSY)) {
busyStatus = CalendarUtilities.BUSY_STATUS_FREE;
}
int attendeeStatus =
CalendarUtilities.attendeeStatusFromBusyStatus(busyStatus);
attendee.put(Attendees.ATTENDEE_STATUS, attendeeStatus);