From 32db98f8eb146662e086e6c58f1ce188112f2c71 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 2 Jul 2010 14:53:11 -0700 Subject: [PATCH] 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 --- src/com/android/exchange/adapter/CalendarSyncAdapter.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/exchange/adapter/CalendarSyncAdapter.java b/src/com/android/exchange/adapter/CalendarSyncAdapter.java index 59a98234a..04c2c6a13 100644 --- a/src/com/android/exchange/adapter/CalendarSyncAdapter.java +++ b/src/com/android/exchange/adapter/CalendarSyncAdapter.java @@ -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);