Clarify logic for when an importer needs a password prompt.
This commit is contained in:
parent
89bdbdce94
commit
2e7a785209
1 changed files with 3 additions and 4 deletions
|
@ -47,12 +47,11 @@ public class StorageImporter {
|
|||
{
|
||||
throw new StorageImportExportException(activity.getString(R.string.settings_unknown_version, version));
|
||||
}
|
||||
if (providedEncryptionKey != null || storageImporter.needsKey() == false) {
|
||||
Log.i(K9.LOG_TAG, "Version " + version + " settings file needs encryption key");
|
||||
finishImport(activity, storageImporter, dataset, providedEncryptionKey, listener);
|
||||
if (storageImporter.needsKey() && providedEncryptionKey == null) {
|
||||
gatherPassword(activity, storageImporter, dataset, listener);
|
||||
}
|
||||
else {
|
||||
gatherPassword(activity, storageImporter, dataset, listener);
|
||||
finishImport(activity, storageImporter, dataset, providedEncryptionKey, listener);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
Loading…
Reference in a new issue