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: Ie2c375278b79b47dedac02472dfe6e4cf1182b65
This commit is contained in:
Marc Blank 2010-07-02 14:53:11 -07:00
parent 42ff939e3a
commit 32db98f8eb
1 changed files with 8 additions and 0 deletions

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);