mirror of
https://github.com/etesync/android
synced 2024-11-26 01:48:34 +00:00
Contact import: Don't list accounts with an empty account name or type.
This commit is contained in:
parent
25759a4e86
commit
12c41b450c
@ -102,11 +102,13 @@ public class LocalContactImportFragment extends Fragment {
|
|||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
String accountName = cursor.getString(accountNameIndex);
|
String accountName = cursor.getString(accountNameIndex);
|
||||||
String accountType = cursor.getString(accountTypeIndex);
|
String accountType = cursor.getString(accountTypeIndex);
|
||||||
if (account == null || (!account.name.equals(accountName) || !account.type.equals(accountType))) {
|
if (account == null || !(account.name.equals(accountName) && account.type.equals(accountType))) {
|
||||||
|
if ((accountName != null) && (accountType != null)) {
|
||||||
account = new Account(accountName, accountType);
|
account = new Account(accountName, accountType);
|
||||||
localAddressBooks.add(new LocalAddressBook(getContext(), account, provider));
|
localAddressBooks.add(new LocalAddressBook(getContext(), account, provider));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cursor.close();
|
cursor.close();
|
||||||
provider.release();
|
provider.release();
|
||||||
|
Loading…
Reference in New Issue
Block a user