Remove db access in MailboxAlarmReceiver
Bug: 2835313 Change-Id: I61e3672efed85bfa101c731a08cfec8141860c94
This commit is contained in:
parent
a241d61ce8
commit
5f299d2176
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue