Merge "Respect the RESPONSE_REQUESTED tag in meeting invite mail"

This commit is contained in:
Marc Blank 2010-10-21 08:14:44 -07:00 committed by Android (Google) Code Review
commit ca065c3927
3 changed files with 13 additions and 0 deletions

View File

@ -25,4 +25,5 @@ public class MeetingInfo {
public static final String MEETING_DTEND = "DTEND";
public static final String MEETING_TITLE = "TITLE";
public static final String MEETING_LOCATION = "LOC";
public static final String MEETING_RESPONSE_REQUESTED = "RESPONSE";
}

View File

@ -1182,6 +1182,15 @@ public class EasSyncService extends AbstractSyncService {
InputStream is = res.getEntity().getContent();
if (len != 0) {
new MeetingResponseParser(is, this).parse();
String meetingInfo = msg.mMeetingInfo;
if (meetingInfo != null) {
String responseRequested =
new PackedString(meetingInfo).get(MeetingInfo.MEETING_RESPONSE_REQUESTED);
// If there's no tag, or a non-zero tag, we send the response mail
if ("0".equals(responseRequested)) {
return;
}
}
sendMeetingResponseMail(msg, req.mResponse);
}
} else if (isAuthError(status)) {

View File

@ -368,6 +368,9 @@ public class EmailSyncAdapter extends AbstractSyncAdapter {
case Tags.EMAIL_RECURRENCES:
recurrencesParser();
break;
case Tags.EMAIL_RESPONSE_REQUESTED:
packedString.put(MeetingInfo.MEETING_RESPONSE_REQUESTED, getValue());
break;
default:
skipTag();
}