mirror of
https://github.com/etesync/android
synced 2024-11-26 09:58:11 +00:00
Fix crash when ROLE/TITLE but no ORG value set (fixes #163)
This commit is contained in:
parent
ea06c4a7a1
commit
ea31f5a621
@ -699,11 +699,13 @@ public class LocalAddressBook extends LocalCollection<Contact> {
|
|||||||
protected Builder buildOrganization(Builder builder, ezvcard.property.Organization organization, String jobTitle, String jobDescription) {
|
protected Builder buildOrganization(Builder builder, ezvcard.property.Organization organization, String jobTitle, String jobDescription) {
|
||||||
String company = null, department = null;
|
String company = null, department = null;
|
||||||
|
|
||||||
Iterator<String> org = organization.getValues().iterator();
|
if (organization != null) {
|
||||||
if (org.hasNext())
|
Iterator<String> org = organization.getValues().iterator();
|
||||||
company = org.next();
|
if (org.hasNext())
|
||||||
if (org.hasNext())
|
company = org.next();
|
||||||
department = org.next();
|
if (org.hasNext())
|
||||||
|
department = org.next();
|
||||||
|
}
|
||||||
|
|
||||||
return builder
|
return builder
|
||||||
.withValue(Data.MIMETYPE, Organization.CONTENT_ITEM_TYPE)
|
.withValue(Data.MIMETYPE, Organization.CONTENT_ITEM_TYPE)
|
||||||
|
Loading…
Reference in New Issue
Block a user