summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2011-02-24 18:27:50 -0800
committerFred Quintana <fredq@google.com>2011-03-01 11:23:19 -0800
commitf9f240e3ad5ff5eeaa32fbb2dd65ef7f3b06af32 (patch)
tree31f03102a5da42574382451a794e894439af05f8 /core/tests
parent9d30f5bce1be1548d069c8bcf80f566c2b173a48 (diff)
downloadframeworks_base-f9f240e3ad5ff5eeaa32fbb2dd65ef7f3b06af32.zip
frameworks_base-f9f240e3ad5ff5eeaa32fbb2dd65ef7f3b06af32.tar.gz
frameworks_base-f9f240e3ad5ff5eeaa32fbb2dd65ef7f3b06af32.tar.bz2
Fix a deadlock in AccountManagerService cause by different
paths of code getting the mCacheLock and DB locks in different orders. The philosophy I followed for this was to ensure that the DatabaseHelper is only ever accessed from within a synchronized(mCacheLock) block. I also renamed a bunch of methods to make it easier to know if a given method should be called from within this synchronized block. Bug: 3404506 Change-Id: Ia48f95e77b77647d0717f70f1d8364da3719cc13
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
index 887b032..6efc61a 100644
--- a/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
+++ b/core/tests/coretests/src/android/accounts/AccountManagerServiceTest.java
@@ -96,7 +96,7 @@ public class AccountManagerServiceTest extends AndroidTestCase {
assertEquals(a21, accounts[1]);
assertEquals(a31, accounts[2]);
- mAms.removeAccount(a21);
+ mAms.removeAccountInternal(a21);
accounts = mAms.getAccounts("type1" );
Arrays.sort(accounts, new AccountSorter());