From 8b755f600c1a99a0b62eb0497115837f36237d7c Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Fri, 19 Aug 2011 15:27:00 -0700 Subject: [PATCH] Make sure reconcileAccounts in AccountService is synchronous * This is important so that callers can know that reconciliation is complete. Bug: 5189766 Change-Id: I4fbbaa6506042f975e7ad4e828fe8399c4d4a366 --- .../com/android/emailcommon/service/AccountServiceProxy.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emailcommon/src/com/android/emailcommon/service/AccountServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/AccountServiceProxy.java index 8f26dbc73..f4eb93009 100644 --- a/emailcommon/src/com/android/emailcommon/service/AccountServiceProxy.java +++ b/emailcommon/src/com/android/emailcommon/service/AccountServiceProxy.java @@ -64,6 +64,7 @@ public class AccountServiceProxy extends ServiceProxy implements IAccountService }, "notifyLoginSucceeded"); } + // The following call is synchronous, and should not be made from the UI thread @Override public void reconcileAccounts(final String protocol, final String accountManagerType) { setTask(new ProxyTask() { @@ -72,6 +73,7 @@ public class AccountServiceProxy extends ServiceProxy implements IAccountService mService.reconcileAccounts(protocol, accountManagerType); } }, "reconcileAccounts"); + waitForCompletion(); } // The following call is synchronous, and should not be made from the UI thread