From c2e9e4b3459ca9c99c8bc4f0871338bbb471e1eb Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 2 Nov 2011 22:56:23 -0700 Subject: [PATCH] Prefer Utility.combine over Account.combinedUuids --- src/com/fsck/k9/Account.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 2693b011a..07a8a5f99 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -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();