/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 15:53:30 UTC
  • Revision ID: tim@ed.am-20121221155330-j2zt31mh1b55mdty
added thank you message to intro

Show diffs side-by-side

added added

removed removed

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