Rename 'AccountSettings' to 'AccountSettingsDescriptions'
This commit is contained in:
parent
6e6abe2e68
commit
c5195890a1
3 changed files with 6 additions and 6 deletions
|
@ -37,7 +37,7 @@ import com.fsck.k9.preferences.Settings.StringSetting;
|
||||||
import com.fsck.k9.preferences.Settings.V;
|
import com.fsck.k9.preferences.Settings.V;
|
||||||
|
|
||||||
|
|
||||||
public class AccountSettings {
|
public class AccountSettingsDescriptions {
|
||||||
static final Map<String, TreeMap<Integer, SettingsDescription>> SETTINGS;
|
static final Map<String, TreeMap<Integer, SettingsDescription>> SETTINGS;
|
||||||
private static final Map<Integer, SettingsUpgrader> UPGRADERS;
|
private static final Map<Integer, SettingsUpgrader> UPGRADERS;
|
||||||
|
|
|
@ -212,7 +212,7 @@ class SettingsExporter(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val versionedSetting = AccountSettings.SETTINGS[keyPart]
|
val versionedSetting = AccountSettingsDescriptions.SETTINGS[keyPart]
|
||||||
if (versionedSetting != null) {
|
if (versionedSetting != null) {
|
||||||
val highestVersion = versionedSetting.lastKey()
|
val highestVersion = versionedSetting.lastKey()
|
||||||
|
|
||||||
|
|
|
@ -414,20 +414,20 @@ public class SettingsImporter {
|
||||||
|
|
||||||
// Validate account settings
|
// Validate account settings
|
||||||
Map<String, Object> validatedSettings =
|
Map<String, Object> validatedSettings =
|
||||||
AccountSettings.validate(contentVersion, account.settings.settings, !mergeImportedAccount);
|
AccountSettingsDescriptions.validate(contentVersion, account.settings.settings, !mergeImportedAccount);
|
||||||
|
|
||||||
// Upgrade account settings to current content version
|
// Upgrade account settings to current content version
|
||||||
if (contentVersion != Settings.VERSION) {
|
if (contentVersion != Settings.VERSION) {
|
||||||
AccountSettings.upgrade(contentVersion, validatedSettings);
|
AccountSettingsDescriptions.upgrade(contentVersion, validatedSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert account settings to the string representation used in preference storage
|
// Convert account settings to the string representation used in preference storage
|
||||||
Map<String, String> stringSettings = AccountSettings.convert(validatedSettings);
|
Map<String, String> stringSettings = AccountSettingsDescriptions.convert(validatedSettings);
|
||||||
|
|
||||||
// Merge account settings if necessary
|
// Merge account settings if necessary
|
||||||
Map<String, String> writeSettings;
|
Map<String, String> writeSettings;
|
||||||
if (mergeImportedAccount) {
|
if (mergeImportedAccount) {
|
||||||
writeSettings = new HashMap<>(AccountSettings.getAccountSettings(prefs.getStorage(), uuid));
|
writeSettings = new HashMap<>(AccountSettingsDescriptions.getAccountSettings(prefs.getStorage(), uuid));
|
||||||
writeSettings.putAll(stringSettings);
|
writeSettings.putAll(stringSettings);
|
||||||
} else {
|
} else {
|
||||||
writeSettings = stringSettings;
|
writeSettings = stringSettings;
|
||||||
|
|
Loading…
Reference in a new issue