Explanation of the reasons for mapping imported UUIDs into new local
UUIDs.
This commit is contained in:
parent
e5ef068c15
commit
90e88c251e
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,15 @@ public class StorageImporterEncryptedXml implements IStorageImporter {
|
||||||
String data = dataset.data.toString();
|
String data = dataset.data.toString();
|
||||||
List<Integer> accountNumbers = Account.getExistingAccountNumbers(preferences);
|
List<Integer> accountNumbers = Account.getExistingAccountNumbers(preferences);
|
||||||
Log.i(K9.LOG_TAG, "Existing accountNumbers = " + accountNumbers);
|
Log.i(K9.LOG_TAG, "Existing accountNumbers = " + accountNumbers);
|
||||||
|
/**
|
||||||
|
* We translate UUIDs in the import file into new UUIDs in the local instance for the following reasons:
|
||||||
|
* 1) Accidentally importing the same file twice cannot damage settings in an existing account.
|
||||||
|
* (Say, an account that was imported two months ago and has since had significant settings changes.)
|
||||||
|
* 2) All UUIDs used in the local instance will be generated with the same generator.
|
||||||
|
* 3) Importing a single file multiple times allows for creating multiple accounts from the same template.
|
||||||
|
* 4) Exporting an account and importing back into the same instance is a poor-man's account copy (until a real
|
||||||
|
* copy function is created, if ever)
|
||||||
|
*/
|
||||||
Map<String, String> uuidMapping = new HashMap<String, String>();
|
Map<String, String> uuidMapping = new HashMap<String, String>();
|
||||||
String accountUuids = preferences.getPreferences().getString("accountUuids", null);
|
String accountUuids = preferences.getPreferences().getString("accountUuids", null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue