From a09459f6f4a1bc85a9289cd01a4ab71d1c756f09 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 16 Aug 2010 09:44:54 -0700 Subject: [PATCH] Run AccountsUpdatedListener work in worker thread Bug: 2922224 Change-Id: If7b61c4f41d901fd71d571450fa5fa7f3ff11535 --- src/com/android/email/service/MailService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/service/MailService.java b/src/com/android/email/service/MailService.java index 6da9deaf6..e4066dacd 100644 --- a/src/com/android/email/service/MailService.java +++ b/src/com/android/email/service/MailService.java @@ -21,6 +21,7 @@ import com.android.email.Controller; import com.android.email.Email; import com.android.email.R; import com.android.email.SecurityPolicy; +import com.android.email.Utility; import com.android.email.activity.MessageList; import com.android.email.mail.MessagingException; import com.android.email.provider.EmailContent; @@ -818,7 +819,11 @@ public class MailService extends Service { */ public class AccountsUpdatedListener implements OnAccountsUpdateListener { public void onAccountsUpdated(android.accounts.Account[] accounts) { - reconcilePopImapAccounts(MailService.this); + Utility.runAsync(new Runnable() { + @Override + public void run() { + reconcilePopImapAccounts(MailService.this); + }}); } }