/android/export-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/export-contacts

« back to all changes in this revision

Viewing changes to src/am/ed/exportcontacts/ContactsContractBackend.java

  • Committer: Tim Marston
  • Date: 2013-03-04 16:29:21 UTC
  • Revision ID: tim@ed.am-20130304162921-0b456wmqs00zrjp2
corrected typo

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * ContactsContractContactAccessor.java
3
3
 *
4
 
 * Copyright (C) 2011 to 2013 Tim Marston <tim@ed.am>
 
4
 * Copyright (C) 2011 to 2012 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Export Contacts program (hereafter referred
7
 
 * to as "this program").  For more information, see
 
7
 * to as "this program"). For more information, see
8
8
 * http://ed.am/dev/android/export-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
144
144
                                ContactsContract.Data.DATA4,
145
145
                        },
146
146
                        ContactsContract.Data.CONTACT_ID + " = ? AND " +
147
 
// column DELETED not found!?
 
147
// column DELTED not found!?
148
148
//                              ContactsContract.Data.DELETED + " = 0 AND " +
149
 
                                ContactsContract.Data.MIMETYPE + " IN ( ?, ?, ?, ?, ?, ? ) ",
 
149
                                ContactsContract.Data.MIMETYPE + " IN ( ?, ?, ?, ?, ? )",
150
150
                        new String[] {
151
151
                                String.valueOf( id ),
152
152
                                CommonDataKinds.Phone.CONTENT_ITEM_TYPE,
154
154
                                CommonDataKinds.Organization.CONTENT_ITEM_TYPE,
155
155
                                CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE,
156
156
                                CommonDataKinds.Note.CONTENT_ITEM_TYPE,
157
 
                                CommonDataKinds.Event.CONTENT_ITEM_TYPE,
158
157
                        },
159
158
                        ContactsContract.Data.IS_SUPER_PRIMARY + " DESC, " +
160
159
                                ContactsContract.Data.RAW_CONTACT_ID + ", " +
203
202
                        else if( type.equals( CommonDataKinds.Note.CONTENT_ITEM_TYPE ) )
204
203
                                contact.addNote( cur.getString( cur.getColumnIndex(
205
204
                                        CommonDataKinds.Note.NOTE ) ) );
206
 
 
207
 
                        // add birthday
208
 
                        else if( type.equals( CommonDataKinds.Event.CONTENT_ITEM_TYPE ) ) {
209
 
                                int event = cur.getInt( cur.getColumnIndex(
210
 
                                        CommonDataKinds.Event.TYPE ) );
211
 
                                if( event == CommonDataKinds.Event.TYPE_BIRTHDAY )
212
 
                                        contact.setBirthday( cur.getString( cur.getColumnIndex(
213
 
                                                CommonDataKinds.Event.START_DATE ) ) );
214
 
                        }
215
205
                }
216
206
                cur.close();
217
207