summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2015-06-17 08:48:53 +0200
committerDanny Baumann <dannybaumann@web.de>2015-06-17 14:35:58 +0200
commit37466e200a4d8726a923e34aabd3b5305e400031 (patch)
tree8c6058b05f91423dce59652197b7bb67f8704d65
parent094f8e300fc3692044d9883a7349640abff2bb84 (diff)
downloadandroid_packages_apps_Email-37466e200a4d8726a923e34aabd3b5305e400031.tar.gz
android_packages_apps_Email-37466e200a4d8726a923e34aabd3b5305e400031.tar.bz2
android_packages_apps_Email-37466e200a4d8726a923e34aabd3b5305e400031.zip
Improve debug logging.
Change-Id: I13a99d5caadcc7bd2682791527f71a697d07f8d0
-rw-r--r--provider_src/com/android/email/provider/EmailProvider.java4
-rw-r--r--provider_src/com/android/email/service/ImapService.java11
2 files changed, 10 insertions, 5 deletions
diff --git a/provider_src/com/android/email/provider/EmailProvider.java b/provider_src/com/android/email/provider/EmailProvider.java
index 8e4e7b6a1..a73cbf9e3 100644
--- a/provider_src/com/android/email/provider/EmailProvider.java
+++ b/provider_src/com/android/email/provider/EmailProvider.java
@@ -1820,6 +1820,8 @@ public class EmailProvider extends ContentProvider
extras.putBoolean(ContentResolver.SYNC_EXTRAS_DO_NOT_RETRY, true);
extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
ContentResolver.requestSync(amAccount, EmailContent.AUTHORITY, extras);
+ LogUtils.i(TAG, "requestSync EmailProvider restoreAccounts %s, %s",
+ account.toString(), extras.toString());
restoredCount++;
}
}
@@ -5978,7 +5980,7 @@ public class EmailProvider extends ContentProvider
extras.putString(EmailServiceStatus.SYNC_EXTRAS_CALLBACK_METHOD,
SYNC_STATUS_CALLBACK_METHOD);
ContentResolver.requestSync(account, EmailContent.AUTHORITY, extras);
- LogUtils.i(TAG, "requestSync EmailProvider startSync %s, %s", account.toString(),
+ LogUtils.i(TAG, "requestSync EmailProvider restartPush %s, %s", account.toString(),
extras.toString());
}
diff --git a/provider_src/com/android/email/service/ImapService.java b/provider_src/com/android/email/service/ImapService.java
index 9fdd864f8..075e11d4d 100644
--- a/provider_src/com/android/email/service/ImapService.java
+++ b/provider_src/com/android/email/service/ImapService.java
@@ -270,6 +270,9 @@ public class ImapService extends Service {
// Request a quick sync to make sure we didn't lose any new mails
// during the failure time
ImapService.requestSync(mContext, account, mMailbox.mId, false);
+ LogUtils.d(LOG_TAG, "requestSync after reschedulePing for account %s (%s)",
+ account.toString(), mMailbox.mDisplayName);
+
} catch (MessagingException ex) {
LogUtils.w(LOG_TAG, ex, "Failed to register mailbox for idle. Reschedule.");
reschedulePing(increasePingDelay());
@@ -544,6 +547,8 @@ public class ImapService extends Service {
// Request a "recents" sync
ImapService.requestSync(mContext,
account, Mailbox.NO_MAILBOX, false);
+ LogUtils.d(LOG_TAG, "requestSync after restarting IDLE "
+ + "for account %s", account.toString());
}
} finally {
c.close();
@@ -806,6 +811,8 @@ public class ImapService extends Service {
}
mBinder.init(context);
mBinder.requestSync(inboxId,true,0);
+ LogUtils.d(LOG_TAG, "requestSync on user request for account %d (%d)",
+ accountId, inboxId);
} else if (ACTION_DELETE_MESSAGE.equals(action)) {
final long messageId = intent.getLongExtra(EXTRA_MESSAGE_ID, -1);
if (Logging.LOGD) {
@@ -1007,10 +1014,6 @@ public class ImapService extends Service {
}
private static void requestSync(Context context, Account account, long mailbox, boolean full) {
- if (Logging.LOGD) {
- LogUtils.d(LOG_TAG, "Request sync due to idle response for mailbox " + mailbox);
- }
-
final EmailServiceUtils.EmailServiceInfo info = EmailServiceUtils.getServiceInfoForAccount(
context, account.mId);
final android.accounts.Account acct = new android.accounts.Account(