/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: edam
  • Date: 2012-12-21 17:49:39 UTC
  • Revision ID: tim@ed.am-20121221174939-rih1gx3m91q8e5gs
removed check for deleted contacts (that seems to be broken); fixed conversion on types for ContactsContract backend

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
                                ContactsContract.Data.DATA4,
141
141
                        },
142
142
                        ContactsContract.Data.CONTACT_ID + " = ? AND " +
143
 
                                ContactsContract.Data.DELETED + " = 0 AND " +
 
143
// column DELTED not found!?
 
144
//                              ContactsContract.Data.DELETED + " = 0 AND " +
144
145
                                ContactsContract.Data.MIMETYPE + " IN ( ?, ?, ?, ?, ? )",
145
146
                        new String[] {
146
147
                                String.valueOf( id ),
170
171
                        // add email addresses
171
172
                        else if( type.equals( CommonDataKinds.Email.CONTENT_ITEM_TYPE ) )
172
173
                                contact.addEmail( contact.new EmailDetail(
173
 
                                        convertBackendTypeToType( CommonDataKinds.Phone.class,
 
174
                                        convertBackendTypeToType( CommonDataKinds.Email.class,
174
175
                                                cur.getInt( cur.getColumnIndex(
175
176
                                                        CommonDataKinds.Email.TYPE ) ) ),
176
177
                                        cur.getString( cur.getColumnIndex(
179
180
                        // add postal addresses
180
181
                        else if( type.equals( CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE ) )
181
182
                                contact.addAddress( contact.new AddressDetail(
182
 
                                        convertBackendTypeToType( CommonDataKinds.Phone.class,
 
183
                                        convertBackendTypeToType( CommonDataKinds.StructuredPostal.class,
183
184
                                                cur.getInt( cur.getColumnIndex(
184
185
                                                        CommonDataKinds.StructuredPostal.TYPE ) ) ),
185
186
                                        cur.getString( cur.getColumnIndex(