mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-25 15:11:52 -05:00
Fixed compiler warning
Use new variable instead of overwriting an argument.
This commit is contained in:
parent
ded489daab
commit
c76bec971b
@ -134,12 +134,15 @@ public class StorageExporter {
|
|||||||
Preferences preferences = Preferences.getPreferences(context);
|
Preferences preferences = Preferences.getPreferences(context);
|
||||||
SharedPreferences storage = preferences.getPreferences();
|
SharedPreferences storage = preferences.getPreferences();
|
||||||
|
|
||||||
|
Set<String> exportAccounts;
|
||||||
if (accountUuids == null) {
|
if (accountUuids == null) {
|
||||||
Account[] accounts = preferences.getAccounts();
|
Account[] accounts = preferences.getAccounts();
|
||||||
accountUuids = new HashSet<String>();
|
exportAccounts = new HashSet<String>();
|
||||||
for (Account account : accounts) {
|
for (Account account : accounts) {
|
||||||
accountUuids.add(account.getUuid());
|
exportAccounts.add(account.getUuid());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
exportAccounts = accountUuids;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> prefs = new TreeMap<String, Object>(storage.getAll());
|
Map<String, Object> prefs = new TreeMap<String, Object>(storage.getAll());
|
||||||
@ -151,7 +154,7 @@ public class StorageExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
serializer.startTag(null, ACCOUNTS_ELEMENT);
|
serializer.startTag(null, ACCOUNTS_ELEMENT);
|
||||||
for (String accountUuid : accountUuids) {
|
for (String accountUuid : exportAccounts) {
|
||||||
Account account = preferences.getAccount(accountUuid);
|
Account account = preferences.getAccount(accountUuid);
|
||||||
writeAccount(serializer, account, prefs);
|
writeAccount(serializer, account, prefs);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user