From 2374fcb1a0c952206b3104c7a42dd4d1712598b5 Mon Sep 17 00:00:00 2001 From: satok Date: Tue, 11 Aug 2009 18:47:11 +0900 Subject: [PATCH] Renew Unread Counts and accounts on Resume See bug 2041204 --- src/com/android/email/activity/AccountFolderList.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/email/activity/AccountFolderList.java b/src/com/android/email/activity/AccountFolderList.java index f992ada06..7f40762ce 100644 --- a/src/com/android/email/activity/AccountFolderList.java +++ b/src/com/android/email/activity/AccountFolderList.java @@ -214,6 +214,12 @@ public class AccountFolderList extends ListActivity Controller.getInstance(getApplication()).addResultCallback(mControllerCallback); + if (mLoadAccountsTask != null && + mLoadAccountsTask.getStatus() != LoadAccountsTask.Status.FINISHED) { + mLoadAccountsTask.cancel(true); + } + mLoadAccountsTask = (LoadAccountsTask) new LoadAccountsTask().execute(); + // TODO: What updates do we need to auto-trigger, now that we have mailboxes in view? }