am 7e89834c: Fix problem w/ SmartReply & SmartForward in Exchange 2003

Merge commit '7e89834cfd920a3c4c3fe29d18fae2f7cf4fcbbc' into eclair-plus-aosp

* commit '7e89834cfd920a3c4c3fe29d18fae2f7cf4fcbbc':
  Fix problem w/ SmartReply & SmartForward in Exchange 2003
This commit is contained in:
Marc Blank 2009-09-17 16:00:47 -07:00 committed by Android Git Automerger
commit 725bf7bb85
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,6 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.net.URLEncoder;
public class EasOutboxService extends EasSyncService { public class EasOutboxService extends EasSyncService {
@ -126,8 +125,7 @@ public class EasOutboxService extends EasSyncService {
String cmd = "SendMail&SaveInSent=T"; String cmd = "SendMail&SaveInSent=T";
if (smartSend) { if (smartSend) {
cmd = reply ? "SmartReply" : "SmartForward"; cmd = reply ? "SmartReply" : "SmartForward";
cmd += "&ItemId=" + URLEncoder.encode(itemId, "UTF-8") + "&CollectionId=" cmd += "&ItemId=" + itemId + "&CollectionId=" + collectionId + "&SaveInSent=T";
+ URLEncoder.encode(collectionId, "UTF-8") + "&SaveInSent=T";
} }
userLog("Send cmd: " + cmd); userLog("Send cmd: " + cmd);
HttpResponse resp = sendHttpClientPost(cmd, inputEntity); HttpResponse resp = sendHttpClientPost(cmd, inputEntity);

View File

@ -518,7 +518,9 @@ public class EasSyncService extends AbstractSyncService {
int code = resp.getStatusLine().getStatusCode(); int code = resp.getStatusLine().getStatusCode();
userLog("OPTIONS response: ", code); userLog("OPTIONS response: ", code);
if (code == HttpStatus.SC_OK) { if (code == HttpStatus.SC_OK) {
Header header = resp.getFirstHeader("ms-asprotocolversions"); Header header = resp.getFirstHeader("MS-ASProtocolCommands");
userLog(header.getValue());
header = resp.getFirstHeader("ms-asprotocolversions");
String versions = header.getValue(); String versions = header.getValue();
if (versions != null) { if (versions != null) {
if (versions.contains("12.0")) { if (versions.contains("12.0")) {