summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnthony Lee <anthonylee@google.com>2014-10-21 13:18:18 -0700
committerAnthony Lee <anthonylee@google.com>2014-10-21 13:24:52 -0700
commit19ada70d734e87b746740faadc1f739af1684e0e (patch)
treefb39ef483a9a67b1589589dd632ab05d001d72db /src
parent0ceec56ab66d60124e4aec57c38856c67ba2ab16 (diff)
downloadandroid_packages_apps_Exchange-19ada70d734e87b746740faadc1f739af1684e0e.tar.gz
android_packages_apps_Exchange-19ada70d734e87b746740faadc1f739af1684e0e.tar.bz2
android_packages_apps_Exchange-19ada70d734e87b746740faadc1f739af1684e0e.zip
Add more logging around EAS SmartSend to debug potential issues.
Bug: 17720266 Change-Id: I90f09dd0eb21f1d180efc9d64f70384873c49536
Diffstat (limited to 'src')
-rw-r--r--src/com/android/exchange/eas/EasOutboxSync.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/com/android/exchange/eas/EasOutboxSync.java b/src/com/android/exchange/eas/EasOutboxSync.java
index 6f85f771..60ffc510 100644
--- a/src/com/android/exchange/eas/EasOutboxSync.java
+++ b/src/com/android/exchange/eas/EasOutboxSync.java
@@ -191,30 +191,30 @@ public class EasOutboxSync extends EasOperation {
// The parser holds the status
final int status = p.getStatus();
if (CommandStatus.isNeedsProvisioning(status)) {
- LogUtils.w(LOG_TAG, "Needs provisioning sending mail");
+ LogUtils.w(LOG_TAG, "Needs provisioning before sending message: %d",
+ mMessage.mId);
return RESULT_PROVISIONING_ERROR;
- } else if (status == CommandStatus.ITEM_NOT_FOUND &&
- mSmartSendInfo != null) {
+ } else if (status == CommandStatus.ITEM_NOT_FOUND && mSmartSendInfo != null) {
// Let's retry without "smart" commands.
- LogUtils.w(LOG_TAG, "Needs provisioning sending mail");
+ LogUtils.w(LOG_TAG, "ITEM_NOT_FOUND smart sending message: %d", mMessage.mId);
return RESULT_ITEM_NOT_FOUND;
}
-
// TODO: Set syncServerId = SEND_FAILED in DB?
- LogUtils.d(LOG_TAG, "General failure sending mail");
+ LogUtils.w(LOG_TAG, "General failure sending message: %d", mMessage.mId);
return RESULT_SEND_FAILED;
} catch (final EmptyStreamException e) {
// This is actually fine; an empty stream means SendMail succeeded
- LogUtils.d(LOG_TAG, "empty response sending mail");
+ LogUtils.d(LOG_TAG, "Empty response sending message: %d", mMessage.mId);
// Don't return here, fall through so that we'll delete the sent message.
} catch (final IOException e) {
// Parsing failed in some other way.
- LogUtils.w(LOG_TAG, "IOException sending mail");
+ LogUtils.e(LOG_TAG, e, "IOException sending message: %d", mMessage.mId);
return RESULT_IO_ERROR;
}
} else {
// FLAG: Do we need to parse results for earlier versions?
}
+ LogUtils.d(LOG_TAG, "Returning RESULT_OK after sending: %d", mMessage.mId);
mContext.getContentResolver().delete(
ContentUris.withAppendedId(Message.CONTENT_URI, mMessage.mId), null, null);
return RESULT_OK;
@@ -363,6 +363,7 @@ public class EasOutboxSync extends EasOperation {
// First, we need to get the id of the reply/forward message, 0 is the default value
// so we are looking for something greater than 0.
final long refId = Body.restoreBodySourceKey(context, message.mId);
+ LogUtils.d(LOG_TAG, "getSmartSendInfo - found refId: %d for %d", refId, message.mId);
if (refId > 0) {
// Then, we need the serverId and mailboxKey of the message
final String[] colsMailboxKey = Utility.getRowColumns(context, Message.CONTENT_URI,
@@ -406,6 +407,10 @@ public class EasOutboxSync extends EasOperation {
requiredAtts = null;
}
return new SmartSendInfo(itemId, collectionId, reply, requiredAtts);
+ } else {
+ LogUtils.w(LOG_TAG,
+ "getSmartSendInfo - Skipping SmartSend, could not find IDs for: %d",
+ message.mId);
}
return null;
}