From 6f207f5df2a1b4190e5da243fd497dcf168899af Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 2 Jul 2010 14:53:11 -0700 Subject: [PATCH] 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 --- 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 67fc5c609..11d1e5de0 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);