From 5aac4a74961b4424e6cf3d263aee51c76d5e9e55 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Sat, 22 Aug 2009 12:13:24 -0700 Subject: [PATCH] Fix bug #2071895 (NPE); remove unused method. --- src/com/android/exchange/SyncManager.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index ebb9722cf..ab3e23f57 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -1424,8 +1424,10 @@ public class SyncManager extends Service implements Runnable { if (INSTANCE.mServiceMap.get(mailboxId) == null) { INSTANCE.mSyncErrorMap.remove(mailboxId); Mailbox m = Mailbox.restoreMailboxWithId(INSTANCE, mailboxId); - INSTANCE.log("Starting sync for " + m.mDisplayName); - INSTANCE.startService(m, reason, req); + if (m != null) { + INSTANCE.log("Starting sync for " + m.mDisplayName); + INSTANCE.startService(m, reason, req); + } } } return INSTANCE.mServiceMap.get(mailboxId); @@ -1461,17 +1463,6 @@ public class SyncManager extends Service implements Runnable { } } - static public void kick(long mailboxId) { - if (INSTANCE == null) return; - Mailbox m = Mailbox.restoreMailboxWithId(INSTANCE, mailboxId); - int syncType = m.mSyncInterval; - if (syncType == Mailbox.CHECK_INTERVAL_PUSH) { - SyncManager.serviceRequestImmediate(mailboxId); - } else { - SyncManager.startManualSync(mailboxId, SYNC_KICK, null); - } - } - static public void accountUpdated(long acctId) { if (INSTANCE == null) return; synchronized (sSyncToken) {