Maybe fix issue #2568615: System server crashed in SyncStorageEngine

Ack, we were acquiring the wrong lock at some points when
accessing the data structure!

Change-Id: I8bbc8e1ffa2e3e8a94bf7625e3d7f020c458eea2
This commit is contained in:
Dianne Hackborn
2010-04-06 22:00:59 -07:00
parent 567b57b688
commit 4e80820ab5

View File

@@ -330,11 +330,11 @@ public class SyncStorageEngine extends Handler {
@Override public void handleMessage(Message msg) {
if (msg.what == MSG_WRITE_STATUS) {
synchronized (mAccounts) {
synchronized (mAuthorities) {
writeStatusLocked();
}
} else if (msg.what == MSG_WRITE_STATISTICS) {
synchronized (mAccounts) {
synchronized (mAuthorities) {
writeStatisticsLocked();
}
}