From 3ab4a996790cb4fdf7d62ddf17667e91a40719dd Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Sat, 10 Apr 2010 10:30:41 -0700 Subject: [PATCH] Synchronize getAccountById on sAccountList * This fixes a ConcurrentModificationException seen in monkey testing Bug: 2586524 Change-Id: I3634678218827d5cffeef20c154b3826f9e5f36f --- src/com/android/exchange/SyncManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/exchange/SyncManager.java b/src/com/android/exchange/SyncManager.java index e93d6e02c..9772515d7 100644 --- a/src/com/android/exchange/SyncManager.java +++ b/src/com/android/exchange/SyncManager.java @@ -807,7 +807,9 @@ public class SyncManager extends Service implements Runnable { } static public Account getAccountById(long accountId) { - return sAccountList.getById(accountId); + synchronized (sAccountList) { + return sAccountList.getById(accountId); + } } static public String getEasAccountSelector() {