1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Don't call promptForServerPasswords() if we already know all passwords

This commit is contained in:
cketti 2011-11-07 01:44:10 +01:00
parent d6c03de6f5
commit 6d9463801e

View File

@ -1383,11 +1383,15 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
List<Account> disabledAccounts = new ArrayList<Account>();
for (AccountDescriptionPair accountPair : mImportResults.importedAccounts) {
Account account = preferences.getAccount(accountPair.imported.uuid);
if (!account.isEnabled()) {
if (account != null && !account.isEnabled()) {
disabledAccounts.add(account);
}
}
activity.promptForServerPasswords(disabledAccounts);
if (disabledAccounts.size() > 0) {
activity.promptForServerPasswords(disabledAccounts);
} else {
activity.setNonConfigurationInstance(null);
}
}
}