Loading app/core/src/main/java/com/fsck/k9/Account.java +11 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ public class Account implements BaseAccount, StoreConfig { private boolean autocryptPreferEncryptMutual; private boolean openPgpHideSignOnly; private boolean openPgpEncryptSubject; private boolean openPgpEncryptAllDrafts; private boolean markMessageAsReadOnView; private boolean alwaysShowCcBcc; private boolean allowRemoteSearch; Loading Loading @@ -461,6 +462,7 @@ public class Account implements BaseAccount, StoreConfig { openPgpKey = storage.getLong(accountUuid + ".cryptoKey", NO_OPENPGP_KEY); openPgpHideSignOnly = storage.getBoolean(accountUuid + ".openPgpHideSignOnly", true); openPgpEncryptSubject = storage.getBoolean(accountUuid + ".openPgpEncryptSubject", true); openPgpEncryptAllDrafts = storage.getBoolean(accountUuid + ".openPgpEncryptAllDrafts", true); autocryptPreferEncryptMutual = storage.getBoolean(accountUuid + ".autocryptMutualMode", false); allowRemoteSearch = storage.getBoolean(accountUuid + ".allowRemoteSearch", false); remoteSearchFullText = storage.getBoolean(accountUuid + ".remoteSearchFullText", false); Loading Loading @@ -740,6 +742,7 @@ public class Account implements BaseAccount, StoreConfig { editor.putLong(accountUuid + ".cryptoKey", openPgpKey); editor.putBoolean(accountUuid + ".openPgpHideSignOnly", openPgpHideSignOnly); editor.putBoolean(accountUuid + ".openPgpEncryptSubject", openPgpEncryptSubject); editor.putBoolean(accountUuid + ".openPgpEncryptAllDrafts", openPgpEncryptAllDrafts); editor.putString(accountUuid + ".openPgpProvider", openPgpProvider); editor.putBoolean(accountUuid + ".autocryptMutualMode", autocryptPreferEncryptMutual); editor.putBoolean(accountUuid + ".allowRemoteSearch", allowRemoteSearch); Loading Loading @@ -1591,6 +1594,14 @@ public class Account implements BaseAccount, StoreConfig { this.openPgpEncryptSubject = openPgpEncryptSubject; } public boolean getOpenPgpEncryptAllDrafts() { return openPgpEncryptAllDrafts; } public void setOpenPgpEncryptAllDrafts(boolean openPgpEncryptAllDrafts) { this.openPgpEncryptAllDrafts = openPgpEncryptAllDrafts; } public boolean allowRemoteSearch() { return allowRemoteSearch; } Loading app/core/src/main/java/com/fsck/k9/preferences/AccountSettings.java +3 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,9 @@ public class AccountSettings { s.put("openPgpEncryptSubject", Settings.versions( new V(51, new BooleanSetting(true)) )); s.put("openPgpEncryptAllDrafts", Settings.versions( new V(55, new BooleanSetting(true)) )); s.put("autocryptMutualMode", Settings.versions( new V(50, new BooleanSetting(false)) )); Loading app/core/src/main/java/com/fsck/k9/preferences/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ public static final int VERSION = 54; public static final int VERSION = 55; static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription>> settings, Map<String, String> importedSettings, boolean useDefaultValues) { Loading app/core/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ class PgpMessageBuilderTest : RobolectricTest() { false, false, true, true, CryptoMode.NO_CHOICE ) private val openPgpApi = mock(OpenPgpApi::class.java) Loading app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class AccountSettingsDataStore( "remote_search_enabled" -> account.allowRemoteSearch() "openpgp_hide_sign_only" -> account.openPgpHideSignOnly "openpgp_encrypt_subject" -> account.openPgpEncryptSubject "openpgp_encrypt_all_drafts" -> account.openPgpEncryptAllDrafts "autocrypt_prefer_encrypt" -> account.autocryptPreferEncryptMutual "upload_sent_messages" -> account.isUploadSentMessages else -> defValue Loading Loading @@ -68,6 +69,7 @@ class AccountSettingsDataStore( "remote_search_enabled" -> account.setAllowRemoteSearch(value) "openpgp_hide_sign_only" -> account.openPgpHideSignOnly = value "openpgp_encrypt_subject" -> account.openPgpEncryptSubject = value "openpgp_encrypt_all_drafts" -> account.openPgpEncryptAllDrafts = value "autocrypt_prefer_encrypt" -> account.autocryptPreferEncryptMutual = value "upload_sent_messages" -> account.isUploadSentMessages = value else -> return Loading Loading
app/core/src/main/java/com/fsck/k9/Account.java +11 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ public class Account implements BaseAccount, StoreConfig { private boolean autocryptPreferEncryptMutual; private boolean openPgpHideSignOnly; private boolean openPgpEncryptSubject; private boolean openPgpEncryptAllDrafts; private boolean markMessageAsReadOnView; private boolean alwaysShowCcBcc; private boolean allowRemoteSearch; Loading Loading @@ -461,6 +462,7 @@ public class Account implements BaseAccount, StoreConfig { openPgpKey = storage.getLong(accountUuid + ".cryptoKey", NO_OPENPGP_KEY); openPgpHideSignOnly = storage.getBoolean(accountUuid + ".openPgpHideSignOnly", true); openPgpEncryptSubject = storage.getBoolean(accountUuid + ".openPgpEncryptSubject", true); openPgpEncryptAllDrafts = storage.getBoolean(accountUuid + ".openPgpEncryptAllDrafts", true); autocryptPreferEncryptMutual = storage.getBoolean(accountUuid + ".autocryptMutualMode", false); allowRemoteSearch = storage.getBoolean(accountUuid + ".allowRemoteSearch", false); remoteSearchFullText = storage.getBoolean(accountUuid + ".remoteSearchFullText", false); Loading Loading @@ -740,6 +742,7 @@ public class Account implements BaseAccount, StoreConfig { editor.putLong(accountUuid + ".cryptoKey", openPgpKey); editor.putBoolean(accountUuid + ".openPgpHideSignOnly", openPgpHideSignOnly); editor.putBoolean(accountUuid + ".openPgpEncryptSubject", openPgpEncryptSubject); editor.putBoolean(accountUuid + ".openPgpEncryptAllDrafts", openPgpEncryptAllDrafts); editor.putString(accountUuid + ".openPgpProvider", openPgpProvider); editor.putBoolean(accountUuid + ".autocryptMutualMode", autocryptPreferEncryptMutual); editor.putBoolean(accountUuid + ".allowRemoteSearch", allowRemoteSearch); Loading Loading @@ -1591,6 +1594,14 @@ public class Account implements BaseAccount, StoreConfig { this.openPgpEncryptSubject = openPgpEncryptSubject; } public boolean getOpenPgpEncryptAllDrafts() { return openPgpEncryptAllDrafts; } public void setOpenPgpEncryptAllDrafts(boolean openPgpEncryptAllDrafts) { this.openPgpEncryptAllDrafts = openPgpEncryptAllDrafts; } public boolean allowRemoteSearch() { return allowRemoteSearch; } Loading
app/core/src/main/java/com/fsck/k9/preferences/AccountSettings.java +3 −0 Original line number Diff line number Diff line Loading @@ -239,6 +239,9 @@ public class AccountSettings { s.put("openPgpEncryptSubject", Settings.versions( new V(51, new BooleanSetting(true)) )); s.put("openPgpEncryptAllDrafts", Settings.versions( new V(55, new BooleanSetting(true)) )); s.put("autocryptMutualMode", Settings.versions( new V(50, new BooleanSetting(false)) )); Loading
app/core/src/main/java/com/fsck/k9/preferences/Settings.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ public static final int VERSION = 54; public static final int VERSION = 55; static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription>> settings, Map<String, String> importedSettings, boolean useDefaultValues) { Loading
app/core/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ class PgpMessageBuilderTest : RobolectricTest() { false, false, true, true, CryptoMode.NO_CHOICE ) private val openPgpApi = mock(OpenPgpApi::class.java) Loading
app/ui/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt +2 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class AccountSettingsDataStore( "remote_search_enabled" -> account.allowRemoteSearch() "openpgp_hide_sign_only" -> account.openPgpHideSignOnly "openpgp_encrypt_subject" -> account.openPgpEncryptSubject "openpgp_encrypt_all_drafts" -> account.openPgpEncryptAllDrafts "autocrypt_prefer_encrypt" -> account.autocryptPreferEncryptMutual "upload_sent_messages" -> account.isUploadSentMessages else -> defValue Loading Loading @@ -68,6 +69,7 @@ class AccountSettingsDataStore( "remote_search_enabled" -> account.setAllowRemoteSearch(value) "openpgp_hide_sign_only" -> account.openPgpHideSignOnly = value "openpgp_encrypt_subject" -> account.openPgpEncryptSubject = value "openpgp_encrypt_all_drafts" -> account.openPgpEncryptAllDrafts = value "autocrypt_prefer_encrypt" -> account.autocryptPreferEncryptMutual = value "upload_sent_messages" -> account.isUploadSentMessages = value else -> return Loading