Home | History | Annotate | Download | only in adapter

Lines Matching refs:cv

190                     ContentValues cv = new ContentValues();
191 cv.put(Groups.ACCOUNT_NAME, mAccount.mEmailAddress);
192 cv.put(Groups.ACCOUNT_TYPE, Eas.EXCHANGE_ACCOUNT_MANAGER_TYPE);
193 cv.put(Settings.UNGROUPED_VISIBLE, true);
194 client.insert(addCallerIsSyncAdapterParameter(Settings.CONTENT_URI), cv);
810 ContentValues cv = new ContentValues();
811 cv.put(RawContacts.DIRTY, 0);
818 addCallerIsSyncAdapterParameter(RawContacts.CONTENT_URI), cv,
828 ContentValues cv = new ContentValues();
851 cv.put(RawContacts.SOURCE_ID, serverId);
852 cv.put(RawContacts.DIRTY, 0);
857 .withValues(cv)
919 ContentValues cv;
927 cv = _ncv.values;
1022 ContentValues cv = namedContentValues.values;
1024 String mimeType = cv.getAsString(Data.MIMETYPE);
1027 if (cv.getAsString(GroupMembership.GROUP_ROW_ID).equals(stringType)) {
1032 // We'll accept either type < 0 (don't care), cv doesn't have a type,
1034 } else if (type < 0 || !cv.containsKey(Email.TYPE) ||
1035 cv.getAsInteger(Email.TYPE) == type) {
1067 ContentValues cv = namedContentValues.values;
1069 String mimeType = cv.getAsString(Data.MIMETYPE);
1072 int subtype = cv.getAsInteger(Phone.TYPE);
1094 * an existing row of this type. If the SmartBuilder's cv field is not null, then
1166 * @param cv a ContentValues object, from a NamedContentValues
1171 private boolean cvCompareString(ContentValues cv, String column, String oldValue) {
1172 if (cv.containsKey(column)) {
1173 if (oldValue != null && cv.getAsString(column).equals(oldValue)) {
1201 ContentValues cv = builder.cv;
1202 if (cv != null && cvCompareString(cv, Event.START_DATE, birthday)) {
1214 ContentValues cv = builder.cv;
1215 if (cv != null && cvCompareString(cv, StructuredName.GIVEN_NAME, givenName) &&
1216 cvCompareString(cv, StructuredName.FAMILY_NAME, familyName) &&
1217 cvCompareString(cv, StructuredName.MIDDLE_NAME, middleName) &&
1218 cvCompareString(cv, StructuredName.PREFIX, prefix) &&
1219 cvCompareString(cv, StructuredName.PHONETIC_GIVEN_NAME, yomiFirstName) &&
1220 cvCompareString(cv, StructuredName.PHONETIC_FAMILY_NAME, yomiLastName) &&
1221 //cvCompareString(cv, StructuredName.DISPLAY_NAME, fileAs) &&
1222 cvCompareString(cv, StructuredName.SUFFIX, suffix)) {
1238 ContentValues cv = builder.cv;
1239 if (cv != null && cvCompareString(cv, EasPersonal.ANNIVERSARY, personal.anniversary) &&
1240 cvCompareString(cv, EasPersonal.FILE_AS , personal.fileAs)) {
1253 ContentValues cv = builder.cv;
1254 if (cv != null && cvCompareString(cv, EasBusiness.ACCOUNT_NAME, business.accountName) &&
1255 cvCompareString(cv, EasBusiness.CUSTOMER_ID, business.customerId) &&
1256 cvCompareString(cv, EasBusiness.GOVERNMENT_ID, business.governmentId)) {
1279 ContentValues cv = builder.cv;
1280 if (cv != null && cvCompareString(cv, Phone.NUMBER, phone)) {
1290 ContentValues cv = builder.cv;
1291 if (cv != null && cvCompareString(cv, Website.URL, url)) {
1301 ContentValues cv = builder.cv;
1302 if (cv != null && cvCompareString(cv, Relation.DATA, value)) {
1313 ContentValues cv = builder.cv;
1314 if (cv != null && cvCompareString(cv, Nickname.NAME, name)) {
1326 ContentValues cv = builder.cv;
1327 if (cv != null && cvCompareString(cv, StructuredPostal.CITY, city) &&
1328 cvCompareString(cv, StructuredPostal.STREET, street) &&
1329 cvCompareString(cv, StructuredPostal.COUNTRY, country) &&
1330 cvCompareString(cv, StructuredPostal.POSTCODE, code) &&
1331 cvCompareString(cv, StructuredPostal.REGION, state)) {
1368 ContentValues cv = ncv.values;
1369 String data = cv.getAsString(COMMON_DATA_ROW);
1371 if (cv.containsKey(COMMON_TYPE_ROW)) {
1372 rowType = cv.getAsInteger(COMMON_TYPE_ROW);
1375 cv.put(FOUND_DATA_ROW, true);
1400 ContentValues cv = ncv.values;
1402 if (!cv.containsKey(FOUND_DATA_ROW)) {
1419 ContentValues cv = builder.cv;
1420 if (cv != null && cvCompareString(cv, Organization.COMPANY, company) &&
1421 cvCompareString(cv, Organization.PHONETIC_NAME, yomiCompanyName) &&
1422 cvCompareString(cv, Organization.DEPARTMENT, department) &&
1423 cvCompareString(cv, Organization.TITLE, title) &&
1424 cvCompareString(cv, Organization.OFFICE_LOCATION, officeLocation)) {
1438 ContentValues cv = builder.cv;
1441 if (cv != null && cvCompareString(cv, Note.NOTE, note)) {
1524 private void sendEmail(Serializer s, ContentValues cv, int count, String displayName)
1527 String addr = cv.getAsString(Email.DATA);
1528 String name = cv.getAsString(Email.DISPLAY_NAME);
1545 private void sendIm(Serializer s, ContentValues cv, int count) throws IOException {
1546 String value = cv.getAsString(Im.DATA);
1553 private void sendOnePostal(Serializer s, ContentValues cv, int[] fieldNames)
1555 sendStringData(s, cv, StructuredPostal.CITY, fieldNames[0]);
1556 sendStringData(s, cv, StructuredPostal.COUNTRY, fieldNames[1]);
1557 sendStringData(s, cv, StructuredPostal.POSTCODE, fieldNames[2]);
1558 sendStringData(s, cv, StructuredPostal.REGION, fieldNames[3]);
1559 sendStringData(s, cv, StructuredPostal.STREET, fieldNames[4]);
1562 private void sendStructuredPostal(Serializer s, ContentValues cv) throws IOException {
1563 switch (cv.getAsInteger(StructuredPostal.TYPE)) {
1565 sendOnePostal(s, cv, HOME_ADDRESS_TAGS);
1568 sendOnePostal(s, cv, WORK_ADDRESS_TAGS);
1571 sendOnePostal(s, cv, OTHER_ADDRESS_TAGS);
1578 private void sendStringData(Serializer s, ContentValues cv, String column, int tag)
1580 if (cv.containsKey(column)) {
1581 String value = cv.getAsString(column);
1588 private String sendStructuredName(Serializer s, ContentValues cv) throws IOException {
1590 sendStringData(s, cv, StructuredName.FAMILY_NAME, Tags.CONTACTS_LAST_NAME);
1591 sendStringData(s, cv, StructuredName.GIVEN_NAME, Tags.CONTACTS_FIRST_NAME);
1592 sendStringData(s, cv, StructuredName.MIDDLE_NAME, Tags.CONTACTS_MIDDLE_NAME);
1593 sendStringData(s, cv, StructuredName.SUFFIX, Tags.CONTACTS_SUFFIX);
1594 sendStringData(s, cv, StructuredName.PHONETIC_GIVEN_NAME, Tags.CONTACTS_YOMI_FIRST_NAME);
1595 sendStringData(s, cv, StructuredName.PHONETIC_FAMILY_NAME, Tags.CONTACTS_YOMI_LAST_NAME);
1596 sendStringData(s, cv, StructuredName.PREFIX, Tags.CONTACTS_TITLE);
1597 if (cv.containsKey(StructuredName.DISPLAY_NAME)) {
1598 displayName = cv.getAsString(StructuredName.DISPLAY_NAME);
1606 private void sendBusiness(Serializer s, ContentValues cv) throws IOException {
1607 sendStringData(s, cv, EasBusiness.ACCOUNT_NAME, Tags.CONTACTS2_ACCOUNT_NAME);
1608 sendStringData(s, cv, EasBusiness.CUSTOMER_ID, Tags.CONTACTS2_CUSTOMER_ID);
1609 sendStringData(s, cv, EasBusiness.GOVERNMENT_ID, Tags.CONTACTS2_GOVERNMENT_ID);
1612 private void sendPersonal(Serializer s, ContentValues cv) throws IOException {
1613 sendStringData(s, cv, EasPersonal.ANNIVERSARY, Tags.CONTACTS_ANNIVERSARY);
1614 sendStringData(s, cv, EasPersonal.FILE_AS, Tags.CONTACTS_FILE_AS);
1617 private void sendBirthday(Serializer s, ContentValues cv) throws IOException {
1618 sendStringData(s, cv, Event.START_DATE, Tags.CONTACTS_BIRTHDAY);
1621 private void sendPhoto(Serializer s, ContentValues cv) throws IOException {
1622 if (cv.containsKey(Photo.PHOTO)) {
1623 byte[] bytes = cv.getAsByteArray(Photo.PHOTO);
1632 private void sendOrganization(Serializer s, ContentValues cv) throws IOException {
1633 sendStringData(s, cv, Organization.TITLE, Tags.CONTACTS_JOB_TITLE);
1634 sendStringData(s, cv, Organization.COMPANY, Tags.CONTACTS_COMPANY_NAME);
1635 sendStringData(s, cv, Organization.DEPARTMENT, Tags.CONTACTS_DEPARTMENT);
1636 sendStringData(s, cv, Organization.OFFICE_LOCATION, Tags.CONTACTS_OFFICE_LOCATION);
1639 private void sendNickname(Serializer s, ContentValues cv) throws IOException {
1640 sendStringData(s, cv, Nickname.NAME, Tags.CONTACTS2_NICKNAME);
1643 private void sendWebpage(Serializer s, ContentValues cv) throws IOException {
1644 sendStringData(s, cv, Website.URL, Tags.CONTACTS_WEBPAGE);
1647 private void sendNote(Serializer s, ContentValues cv) throws IOException {
1651 if (cv.containsKey(Note.NOTE)) {
1653 note = cv.getAsString(Note.NOTE).replaceAll("\n", "\r\n");
1665 private void sendChildren(Serializer s, ContentValues cv) throws IOException {
1669 if (cv.containsKey(row)) {
1674 s.data(Tags.CONTACTS_CHILD, cv.getAsString(row));
1682 private void sendPhone(Serializer s, ContentValues cv, int workCount, int homeCount)
1684 String value = cv.getAsString(Phone.NUMBER);
1686 switch (cv.getAsInteger(Phone.TYPE)) {
1729 private void sendRelation(Serializer s, ContentValues cv) throws IOException {
1730 String value = cv.getAsString(Relation.DATA);
1732 switch (cv.getAsInteger(Relation.TYPE)) {
1840 ContentValues cv = ncv.values;
1841 String mimeType = cv.getAsString(Data.MIMETYPE);
1843 emailValues.add(cv);
1845 sendNickname(s, cv);
1847 sendChildren(s, cv);
1849 sendBusiness(s, cv);
1851 sendWebpage(s, cv);
1853 sendPersonal(s, cv);
1855 sendPhone(s, cv, workPhoneCount, homePhoneCount);
1856 int type = cv.getAsInteger(Phone.TYPE);
1860 sendRelation(s, cv);
1862 displayName = sendStructuredName(s, cv);
1864 sendStructuredPostal(s, cv);
1866 sendOrganization(s, cv);
1868 sendIm(s, cv, imCount++);
1870 Integer eventType = cv.getAsInteger(Event.TYPE);
1872 sendBirthday(s, cv);
1876 groupIds.add(cv.getAsInteger(GroupMembership.GROUP_ROW_ID));
1878 sendNote(s, cv);
1880 sendPhoto(s, cv);
1888 for (ContentValues cv: emailValues) {
1889 sendEmail(s, cv, emailCount++, displayName);