/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/org/waxworlds/edam/exportcontacts/ContactsContactReader.java

  • Committer: edam
  • Date: 2011-06-11 11:34:38 UTC
  • Revision ID: edam@waxworlds.org-20110611113438-wu67n6akbyyln7kf
- fixed a couple of comment headers
- updated TODO
- fixed a bug where a "continue or abort" dialog always continued
- close cursors to prevent leaked resources
- fixed string that referred to Import Contacts app

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * ContactsContactReader.java
3
3
 *
4
 
 * Copyright (C) 2010 Tim Marston <edam@waxworlds.org>
 
4
 * Copyright (C) 2011 Tim Marston <edam@waxworlds.org>
5
5
 *
6
6
 * This file is part of the Export Contacts program (hereafter referred
7
7
 * to as "this program"). For more information, see
92
92
                                        Contacts.Organizations.COMPANY ) ),
93
93
                                cur.getString( cur.getColumnIndex(
94
94
                                        Contacts.Organizations.TITLE ) ) ) );
 
95
                cur.close();
95
96
 
96
97
                // get the phone numbers
97
98
                cur = _activity.managedQuery( Contacts.Phones.CONTENT_URI,
108
109
                                        Contacts.Phones.TYPE ) ),
109
110
                                cur.getString( cur.getColumnIndex(
110
111
                                        Contacts.Phones.NUMBER ) ) ) );
 
112
                cur.close();
111
113
 
112
114
                // get the email and postal addresses
113
115
                cur = _activity.managedQuery( Contacts.ContactMethods.CONTENT_URI,
141
143
                                        cur.getString( cur.getColumnIndex(
142
144
                                                Contacts.ContactMethods.DATA ) ) ) );
143
145
                }
 
146
                cur.close();
144
147
 
145
148
                return true;
146
149
        }