From 88010be3165107c5b22d7cb8549ff9b5f797ea6e Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Wed, 23 Oct 2013 17:50:06 -0400 Subject: [PATCH] Account preferences clean-up There were a number of preferences that were not being removed from the preferences DB when an account was deleted, so they would remain there forever. There were a few attempts to remove preference keys from the DB where the keys were obsolete and not in use for some time. Certain obsolete preferences were not modified: mUuid + ".name" mUuid + ".email" mUuid + ".signature" mUuid + ".signatureUse" These were in use before implementing multiple identities, and are still used as a fallback for old accounts without multiple identities configured. --- src/com/fsck/k9/Account.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/com/fsck/k9/Account.java b/src/com/fsck/k9/Account.java index 67a83e7ef..f9a9bb51e 100644 --- a/src/com/fsck/k9/Account.java +++ b/src/com/fsck/k9/Account.java @@ -529,7 +529,6 @@ public class Account implements BaseAccount { } editor.remove(mUuid + ".storeUri"); - editor.remove(mUuid + ".localStoreUri"); editor.remove(mUuid + ".transportUri"); editor.remove(mUuid + ".description"); editor.remove(mUuid + ".name"); @@ -555,12 +554,10 @@ public class Account implements BaseAccount { editor.remove(mUuid + ".vibrateTimes"); editor.remove(mUuid + ".ring"); editor.remove(mUuid + ".ringtone"); - editor.remove(mUuid + ".lastFullSync"); editor.remove(mUuid + ".folderDisplayMode"); editor.remove(mUuid + ".folderSyncMode"); editor.remove(mUuid + ".folderPushMode"); editor.remove(mUuid + ".folderTargetMode"); - editor.remove(mUuid + ".hideButtonsEnum"); editor.remove(mUuid + ".signatureBeforeQuotedText"); editor.remove(mUuid + ".expungePolicy"); editor.remove(mUuid + ".syncRemoteDeletions"); @@ -586,13 +583,24 @@ public class Account implements BaseAccount { editor.remove(mUuid + ".cryptoAutoSignature"); editor.remove(mUuid + ".cryptoAutoEncrypt"); editor.remove(mUuid + ".enabled"); - editor.remove(mUuid + ".hideMoveButtonsEnum"); editor.remove(mUuid + ".markMessageAsReadOnView"); editor.remove(mUuid + ".alwaysShowCcBcc"); + editor.remove(mUuid + ".allowRemoteSearch"); + editor.remove(mUuid + ".remoteSearchFullText"); + editor.remove(mUuid + ".remoteSearchNumResults"); + editor.remove(mUuid + ".defaultQuotedTextShown"); + editor.remove(mUuid + ".displayCount"); + editor.remove(mUuid + ".inboxFolderName"); + editor.remove(mUuid + ".localStorageProvider"); + editor.remove(mUuid + ".messageFormat"); + editor.remove(mUuid + ".messageReadReceipt"); + editor.remove(mUuid + ".notifyMailCheck"); for (String type : networkTypes) { editor.remove(mUuid + ".useCompression." + type); } deleteIdentities(preferences.getPreferences(), editor); + // TODO: Remove preference settings that may exist for individual + // folders in the account. editor.commit(); }