summaryrefslogtreecommitdiffstats
path: root/provider_src/com
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2015-06-17 08:48:53 +0200
committerSteve Kondik <steve@cyngn.com>2015-10-18 14:05:32 -0700
commit9e42c23d4c20683b7c3bb31e3c14ff7968cd1bab (patch)
treed9e4276254fcc8307c38bdee9d9ebcfa6662e138 /provider_src/com
parentfff063d6d94841e4bbd7d263adb64e68e3c77e04 (diff)
downloadandroid_packages_apps_Email-9e42c23d4c20683b7c3bb31e3c14ff7968cd1bab.tar.gz
android_packages_apps_Email-9e42c23d4c20683b7c3bb31e3c14ff7968cd1bab.tar.bz2
android_packages_apps_Email-9e42c23d4c20683b7c3bb31e3c14ff7968cd1bab.zip
Improve debug logging.
Change-Id: I13a99d5caadcc7bd2682791527f71a697d07f8d0
Diffstat (limited to 'provider_src/com')
-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 1256491ae..4522809f0 100644
--- a/provider_src/com/android/email/service/ImapService.java
+++ b/provider_src/com/android/email/service/ImapService.java
@@ -271,6 +271,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());
@@ -545,6 +548,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();
@@ -807,6 +812,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) {
@@ -1009,10 +1016,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(