From 5f299d21768f2142ff5e1114fd9072235bb6b001 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 16 Aug 2010 20:36:58 -0700 Subject: [PATCH] Remove db access in MailboxAlarmReceiver Bug: 2835313 Change-Id: I61e3672efed85bfa101c731a08cfec8141860c94 --- src/com/android/exchange/MailboxAlarmReceiver.java | 1 - src/com/android/exchange/SyncManager.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/exchange/MailboxAlarmReceiver.java b/src/com/android/exchange/MailboxAlarmReceiver.java index 565b1581f..a4d758a63 100644 --- a/src/com/android/exchange/MailboxAlarmReceiver.java +++ b/src/com/android/exchange/MailboxAlarmReceiver.java @@ -34,7 +34,6 @@ public class MailboxAlarmReceiver extends BroadcastReceiver { if (mailboxId == SyncManager.SYNC_MANAGER_SERVICE_ID) { context.startService(new Intent(context, SyncManager.class)); } else { - SyncManager.log("Alarm received for: " + SyncManager.alarmOwner(mailboxId)); SyncManager.alert(context, mailboxId); } } diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index 58c12f3dc..2d70888ab 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -1400,6 +1400,7 @@ public class SyncManager extends Service implements Runnable { final SyncManager syncManager = INSTANCE; checkSyncManagerServiceRunning(); if (id < 0) { + log("SyncManager alert"); kick("ping SyncManager"); } else if (syncManager == null) { context.startService(new Intent(context, SyncManager.class)); @@ -1418,6 +1419,9 @@ public class SyncManager extends Service implements Runnable { if (m != null) { // We ignore drafts completely (doesn't sync). Changes in Outbox are // handled in the checkMailboxes loop, so we can ignore these pings. + if (Eas.DEBUG) { + Log.d(TAG, "Alert for mailbox " + id + " (" + m.mDisplayName + ")"); + } if (m.mType == Mailbox.TYPE_DRAFTS || m.mType == Mailbox.TYPE_OUTBOX) { String[] args = new String[] {Long.toString(m.mId)}; ContentResolver resolver = INSTANCE.mResolver;