mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Fixing if/else condition
This commit is contained in:
parent
3a9c106aba
commit
b125f4e74b
@ -128,22 +128,23 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
if (isRequired("displayName",populate)) {
|
if (isRequired("displayName",populate)) {
|
||||||
contact.put("displayName", cur.getString(cur.getColumnIndex(People.DISPLAY_NAME)));
|
contact.put("displayName", cur.getString(cur.getColumnIndex(People.DISPLAY_NAME)));
|
||||||
}
|
}
|
||||||
else if (isRequired("phoneNumbers",populate)) {
|
if (isRequired("phoneNumbers",populate)) {
|
||||||
|
Log.d(LOG_TAG, "Populating phone numbers");
|
||||||
contact.put("phoneNumbers", phoneQuery(cr, contactId));
|
contact.put("phoneNumbers", phoneQuery(cr, contactId));
|
||||||
}
|
}
|
||||||
else if (isRequired("emails",populate)) {
|
if (isRequired("emails",populate)) {
|
||||||
contact.put("emails", emailQuery(cr, contactId));
|
contact.put("emails", emailQuery(cr, contactId));
|
||||||
}
|
}
|
||||||
else if (isRequired("addresses",populate)) {
|
if (isRequired("addresses",populate)) {
|
||||||
contact.put("addresses", addressQuery(cr, contactId));
|
contact.put("addresses", addressQuery(cr, contactId));
|
||||||
}
|
}
|
||||||
else if (isRequired("organizations",populate)) {
|
if (isRequired("organizations",populate)) {
|
||||||
contact.put("organizations", organizationQuery(cr, contactId));
|
contact.put("organizations", organizationQuery(cr, contactId));
|
||||||
}
|
}
|
||||||
else if (isRequired("ims",populate)) {
|
if (isRequired("ims",populate)) {
|
||||||
contact.put("ims", imQuery(cr, contactId));
|
contact.put("ims", imQuery(cr, contactId));
|
||||||
}
|
}
|
||||||
else if (isRequired("note",populate)) {
|
if (isRequired("note",populate)) {
|
||||||
contact.put("note", cur.getString(cur.getColumnIndex(People.NOTES)));
|
contact.put("note", cur.getString(cur.getColumnIndex(People.NOTES)));
|
||||||
}
|
}
|
||||||
// nickname
|
// nickname
|
||||||
@ -334,6 +335,8 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
phone = new JSONObject();
|
phone = new JSONObject();
|
||||||
try{
|
try{
|
||||||
|
Log.d(LOG_TAG, "Found = " + cursor.getString(cursor.getColumnIndex(Phones.NUMBER)));
|
||||||
|
|
||||||
phone.put("primary", false);
|
phone.put("primary", false);
|
||||||
phone.put("value", cursor.getString(cursor.getColumnIndex(Phones.NUMBER)));
|
phone.put("value", cursor.getString(cursor.getColumnIndex(Phones.NUMBER)));
|
||||||
phone.put("type", cursor.getString(cursor.getColumnIndex(Phones.TYPE)));
|
phone.put("type", cursor.getString(cursor.getColumnIndex(Phones.TYPE)));
|
||||||
|
Loading…
Reference in New Issue
Block a user