avoid creating Account object with empty name or type
This commit is contained in:
parent
c0ad8662f4
commit
c8dba03e71
|
@ -698,7 +698,9 @@ class ContactsHelper(val activity: Activity) {
|
|||
}
|
||||
}
|
||||
|
||||
val contentResolverAccounts = getContentResolverAccounts().filter { !accounts.contains(Account(it.name, it.type)) }
|
||||
val contentResolverAccounts = getContentResolverAccounts().filter {
|
||||
it.name.isNotEmpty() && it.type.isNotEmpty() && !accounts.contains(Account(it.name, it.type))
|
||||
}
|
||||
sources.addAll(contentResolverAccounts)
|
||||
|
||||
if (sources.isEmpty() && activity.config.localAccountName.isEmpty() && activity.config.localAccountType.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue