Merge branch 'readonly-p4-donut' into donut

This commit is contained in:
Andy Stadler 2009-05-21 10:41:44 -07:00 committed by The Android Open Source Project
commit ae1213c4c9

View File

@ -112,13 +112,6 @@ public class Account implements Serializable {
public void refresh(Preferences preferences) {
mPreferences = preferences;
/**
* Note: Until we have resolved the potential for synchronization failures in
* SharedPreferences, we're going to do a global lock around the read and write
* functions.
*/
synchronized (Account.class) {
mStoreUri = Utility.base64Decode(preferences.mSharedPreferences.getString(mUuid
+ ".storeUri", null));
mLocalStoreUri = preferences.mSharedPreferences.getString(mUuid + ".localStoreUri", null);
@ -165,7 +158,6 @@ public class Account implements Serializable {
mSyncWindow = preferences.mSharedPreferences.getInt(mUuid + KEY_SYNC_WINDOW,
SYNC_WINDOW_USER);
}
}
public String getUuid() {
return mUuid;
@ -228,12 +220,6 @@ public class Account implements Serializable {
}
public void delete(Preferences preferences) {
/**
* Note: Until we have resolved the potential for synchronization failures in
* SharedPreferences, we're going to do a global lock around the read and write
* functions.
*/
synchronized (Account.class) {
String[] uuids = preferences.mSharedPreferences.getString("accountUuids", "").split(",");
StringBuffer sb = new StringBuffer();
for (int i = 0, length = uuids.length; i < length; i++) {
@ -272,17 +258,10 @@ public class Account implements Serializable {
editor.commit();
}
}
public void save(Preferences preferences) {
mPreferences = preferences;
/**
* Note: Until we have resolved the potential for synchronization failures in
* SharedPreferences, we're going to do a global lock around the read and write
* functions.
*/
synchronized (Account.class) {
if (!preferences.mSharedPreferences.getString("accountUuids", "").contains(mUuid)) {
/*
* When the account is first created we assign it a unique account number. The
@ -346,7 +325,6 @@ public class Account implements Serializable {
editor.commit();
}
}
@Override
public String toString() {