Prefer Utility.combine over Account.combinedUuids

This commit is contained in:
Andrew Gaul 2011-11-02 22:56:23 -07:00
parent 976761e0e5
commit c2e9e4b345
1 changed files with 2 additions and 14 deletions

View File

@ -379,18 +379,6 @@ public class Account implements BaseAccount {
mCryptoAutoSignature = prefs.getBoolean(mUuid + ".cryptoAutoSignature", false);
}
private String combineUuids(String[] uuids) {
StringBuilder sb = new StringBuilder();
for (int i = 0, length = uuids.length; i < length; i++) {
if (sb.length() > 0) {
sb.append(',');
}
sb.append(uuids[i]);
}
String accountUuids = sb.toString();
return accountUuids;
}
protected synchronized void delete(Preferences preferences) {
String[] uuids = preferences.getPreferences().getString("accountUuids", "").split(",");
String[] newUuids = new String[uuids.length - 1];
@ -401,7 +389,7 @@ public class Account implements BaseAccount {
}
}
String accountUuids = combineUuids(newUuids);
String accountUuids = Utility.combine(newUuids, ',');
SharedPreferences.Editor editor = preferences.getPreferences().edit();
editor.putString("accountUuids", accountUuids);
@ -519,7 +507,7 @@ public class Account implements BaseAccount {
}
}
}
String accountUuids = combineUuids(newUuids);
String accountUuids = Utility.combine(newUuids, ',');
editor.putString("accountUuids", accountUuids);
editor.commit();
preferences.refreshAccounts();