/android/import-contacts

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

« back to all changes in this revision

Viewing changes to src/am/ed/importcontacts/Importer.java

  • Committer: edam
  • Date: 2012-12-18 13:00:43 UTC
  • Revision ID: tim@ed.am-20121218130043-4zhj1cdeaqko3c4b
cleanup; fixed some typos; updated TODO

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * Importer.java
3
3
 *
4
 
 * Copyright (C) 2009 to 2011 Tim Marston <tim@ed.am>
 
4
 * Copyright (C) 2009 to 2012 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Import Contacts program (hereafter referred
7
7
 * to as "this program"). For more information, see
35
35
import android.os.Message;
36
36
import android.provider.Contacts.PhonesColumns;
37
37
 
38
 
 
39
38
public class Importer extends Thread
40
39
{
41
40
        public final static int ACTION_ABORT = 1;
271
270
                        email = sanitisesEmailAddress( email );
272
271
                        if( email == null )
273
272
                        {
274
 
                                // TODO: warn that an imported email addtrss is being ignored
 
273
                                // TODO: warn that an imported email address is being ignored
275
274
                                return;
276
275
                        }
277
276
 
418
417
                        // update UI
419
418
                        setProgressMessage( R.string.doit_caching );
420
419
 
 
420
                        // create the appropriate backend
421
421
//                      if( Integer.parseInt( android.os.Build.VERSION.SDK ) >= 5 )
422
 
//                              _backend = new ContactsContractBackend();
 
422
//                              _backend = new ContactsContractBackend( _doit );
423
423
//                      else
424
424
                                _backend = new ContactsBackend( _doit );
425
425
 
711
711
                {
712
712
                        // create a new contact
713
713
                        id = _backend.addContact( contact._name );
714
 
                        if( id == null || id <= 0 )
 
714
                        if( id == null )
715
715
                                showError( R.string.error_unabletoaddcontact );
716
716
 
717
717
                        // update cache