From 5ebdc0efeba40654edbc7f8060de057328f64264 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 16 Sep 2009 14:26:15 -0700 Subject: [PATCH] Fix "reloadFolderList" service call in SyncManager * Fixes #2118439 Change-Id: Iee75c5902940fb7f38f19717306708809fa06dd5 --- src/com/android/exchange/SyncManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index 5899a4169..2da2a1fb0 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -825,7 +825,11 @@ public class SyncManager extends Service implements Runnable { if (c.moveToFirst()) { synchronized(sSyncToken) { Mailbox m = new Mailbox().restore(c); - String syncKey = m.mSyncKey; + Account acct = Account.restoreAccountWithId(context, accountId); + if (acct == null) { + return; + } + String syncKey = acct.mSyncKey; // No need to reload the list if we don't have one if (!force && (syncKey == null || syncKey.equals("0"))) { return; @@ -1392,7 +1396,7 @@ public class SyncManager extends Service implements Runnable { int type = c.getInt(Mailbox.CONTENT_TYPE_COLUMN); if (type == Mailbox.TYPE_CONTACTS) { // See if "sync automatically" is set - Account account = + Account account = getAccountById(c.getInt(Mailbox.CONTENT_ACCOUNT_KEY_COLUMN)); if (account != null) { android.accounts.Account a =