1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-16 06:25:06 -05:00

Clarify logic for when an importer needs a password prompt.

This commit is contained in:
danapple 2011-03-20 12:01:29 -05:00
parent 89bdbdce94
commit 2e7a785209

View File

@ -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)