forked from github/cordova-android
Removing extra log calls
This commit is contained in:
parent
36984f4697
commit
c2240966ef
@ -104,7 +104,7 @@
|
|||||||
var obj = new ContactFindOptions();
|
var obj = new ContactFindOptions();
|
||||||
obj.filter="";
|
obj.filter="";
|
||||||
obj.multiple=true;
|
obj.multiple=true;
|
||||||
navigator.service.contacts.find(["name", "phone", "email"], count_contacts, fail, obj);
|
navigator.service.contacts.find(["displayName", "phoneNumbers", "emails"], count_contacts, fail, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
function count_contacts(contacts)
|
function count_contacts(contacts)
|
||||||
|
@ -162,7 +162,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
for (int i=0; i<filter.length(); i++) {
|
for (int i=0; i<filter.length(); i++) {
|
||||||
key = filter.getString(i);
|
key = filter.getString(i);
|
||||||
if (key.startsWith("displayName")) {
|
if (key.startsWith("displayName")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
People.CONTENT_URI,
|
People.CONTENT_URI,
|
||||||
People._ID,
|
People._ID,
|
||||||
@ -178,7 +177,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
// new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE});
|
// new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE});
|
||||||
// }
|
// }
|
||||||
else if (key.startsWith("phoneNumbers")) {
|
else if (key.startsWith("phoneNumbers")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
Phones.CONTENT_URI,
|
Phones.CONTENT_URI,
|
||||||
Phones.PERSON_ID,
|
Phones.PERSON_ID,
|
||||||
@ -186,7 +184,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
new String[] {searchTerm});
|
new String[] {searchTerm});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("emails")) {
|
else if (key.startsWith("emails")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactMethods.CONTENT_EMAIL_URI,
|
ContactMethods.CONTENT_EMAIL_URI,
|
||||||
ContactMethods.PERSON_ID,
|
ContactMethods.PERSON_ID,
|
||||||
@ -194,7 +191,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactMethods.CONTENT_EMAIL_ITEM_TYPE});
|
new String[] {searchTerm, ContactMethods.CONTENT_EMAIL_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("addresses")) {
|
else if (key.startsWith("addresses")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactMethods.CONTENT_URI,
|
ContactMethods.CONTENT_URI,
|
||||||
ContactMethods.PERSON_ID,
|
ContactMethods.PERSON_ID,
|
||||||
@ -202,7 +198,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactMethods.CONTENT_POSTAL_ITEM_TYPE});
|
new String[] {searchTerm, ContactMethods.CONTENT_POSTAL_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("ims")) {
|
else if (key.startsWith("ims")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactMethods.CONTENT_URI,
|
ContactMethods.CONTENT_URI,
|
||||||
ContactMethods.PERSON_ID,
|
ContactMethods.PERSON_ID,
|
||||||
@ -210,7 +205,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactMethods.CONTENT_IM_ITEM_TYPE});
|
new String[] {searchTerm, ContactMethods.CONTENT_IM_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("organizations")) {
|
else if (key.startsWith("organizations")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
Organizations.CONTENT_URI,
|
Organizations.CONTENT_URI,
|
||||||
ContactMethods.PERSON_ID,
|
ContactMethods.PERSON_ID,
|
||||||
@ -218,7 +212,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
new String[] {searchTerm});
|
new String[] {searchTerm});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("note")) {
|
else if (key.startsWith("note")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
People.CONTENT_URI,
|
People.CONTENT_URI,
|
||||||
People._ID,
|
People._ID,
|
||||||
@ -246,7 +239,6 @@ public class ContactAccessorSdk3_4 extends ContactAccessor {
|
|||||||
null);
|
null);
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
Log.d(LOG_TAG, "ID = " + cursor.getString(cursor.getColumnIndex(projection)));
|
|
||||||
contactIds.add(cursor.getString(cursor.getColumnIndex(projection)));
|
contactIds.add(cursor.getString(cursor.getColumnIndex(projection)));
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
|
@ -147,7 +147,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
while (it.hasNext() && (pos < limit)) {
|
while (it.hasNext() && (pos < limit)) {
|
||||||
contact = new JSONObject();
|
contact = new JSONObject();
|
||||||
contactId = it.next();
|
contactId = it.next();
|
||||||
Log.d(LOG_TAG, "Contact ID = " + contactId);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
contact.put("id", contactId);
|
contact.put("id", contactId);
|
||||||
@ -182,7 +181,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
for (int i=0; i<filter.length(); i++) {
|
for (int i=0; i<filter.length(); i++) {
|
||||||
key = filter.getString(i);
|
key = filter.getString(i);
|
||||||
if (key.startsWith("displayName")) {
|
if (key.startsWith("displayName")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Contacts.CONTENT_URI,
|
ContactsContract.Contacts.CONTENT_URI,
|
||||||
ContactsContract.Contacts._ID,
|
ContactsContract.Contacts._ID,
|
||||||
@ -190,7 +188,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm});
|
new String[] {searchTerm});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("name")) {
|
else if (key.startsWith("name")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -198,7 +195,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("nickname")) {
|
else if (key.startsWith("nickname")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -206,7 +202,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.Nickname.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("phoneNumbers")) {
|
else if (key.startsWith("phoneNumbers")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
||||||
ContactsContract.CommonDataKinds.Phone.CONTACT_ID,
|
ContactsContract.CommonDataKinds.Phone.CONTACT_ID,
|
||||||
@ -214,7 +209,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm});
|
new String[] {searchTerm});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("emails")) {
|
else if (key.startsWith("emails")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.CommonDataKinds.Email.CONTENT_URI,
|
ContactsContract.CommonDataKinds.Email.CONTENT_URI,
|
||||||
ContactsContract.CommonDataKinds.Email.CONTACT_ID,
|
ContactsContract.CommonDataKinds.Email.CONTACT_ID,
|
||||||
@ -222,7 +216,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm});
|
new String[] {searchTerm});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("addresses")) {
|
else if (key.startsWith("addresses")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -230,7 +223,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("ims")) {
|
else if (key.startsWith("ims")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -238,7 +230,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.Im.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("organizations")) {
|
else if (key.startsWith("organizations")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -252,7 +243,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if (key.startsWith("note")) {
|
else if (key.startsWith("note")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -260,7 +250,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("relationships")) {
|
else if (key.startsWith("relationships")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -268,7 +257,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
new String[] {searchTerm, ContactsContract.CommonDataKinds.Relation.CONTENT_ITEM_TYPE});
|
new String[] {searchTerm, ContactsContract.CommonDataKinds.Relation.CONTENT_ITEM_TYPE});
|
||||||
}
|
}
|
||||||
else if (key.startsWith("urls")) {
|
else if (key.startsWith("urls")) {
|
||||||
Log.d(LOG_TAG, "Doing " + key + " query");
|
|
||||||
doQuery(searchTerm, contactIds,
|
doQuery(searchTerm, contactIds,
|
||||||
ContactsContract.Data.CONTENT_URI,
|
ContactsContract.Data.CONTENT_URI,
|
||||||
ContactsContract.Data.CONTACT_ID,
|
ContactsContract.Data.CONTACT_ID,
|
||||||
@ -297,7 +285,6 @@ public class ContactAccessorSdk5 extends ContactAccessor {
|
|||||||
null);
|
null);
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
while (cursor.moveToNext()) {
|
||||||
Log.d(LOG_TAG, "ID = " + cursor.getString(cursor.getColumnIndex(projection)));
|
|
||||||
contactIds.add(cursor.getString(cursor.getColumnIndex(projection)));
|
contactIds.add(cursor.getString(cursor.getColumnIndex(projection)));
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user