/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/org/waxworlds/edam/importcontacts/VCFImporter.java

  • Committer: edam
  • Date: 2010-12-12 00:16:42 UTC
  • Revision ID: edam@waxworlds.org-20101212001642-dqxbxww4ik9x7zbp
- update TODO

Show diffs side-by-side

added added

removed removed

596
596
 
597
597
                        // here's the logic...
598
598
                        boolean preferred = types.contains( "PREF" );
599
 
                        int type = PhonesColumns.TYPE_MOBILE;
600
599
                        if( types.contains( "VOICE" ) )
601
600
                                if( types.contains( "WORK" ) )
602
 
                                        type = PhonesColumns.TYPE_WORK;
 
601
                                        addPhone( value, PhonesColumns.TYPE_WORK, preferred );
603
602
                                else
604
 
                                        type = PhonesColumns.TYPE_HOME;
 
603
                                        addPhone( value, PhonesColumns.TYPE_HOME, preferred );
605
604
                        else if( types.contains( "CELL" ) || types.contains( "VIDEO" ) )
606
 
                                type = PhonesColumns.TYPE_MOBILE;
 
605
                                addPhone( value, PhonesColumns.TYPE_MOBILE, preferred );
607
606
                        if( types.contains( "FAX" ) )
608
607
                                if( types.contains( "HOME" ) )
609
 
                                        type = PhonesColumns.TYPE_FAX_HOME;
 
608
                                        addPhone( value, PhonesColumns.TYPE_FAX_HOME, preferred );
610
609
                                else
611
 
                                        type = PhonesColumns.TYPE_FAX_WORK;
 
610
                                        addPhone( value, PhonesColumns.TYPE_FAX_WORK, preferred );
612
611
                        if( types.contains( "PAGER" ) )
613
 
                                type = PhonesColumns.TYPE_PAGER;
614
 
 
615
 
                        // add phone number
616
 
                        addPhone( value, type, preferred );
 
612
                                addPhone( value, PhonesColumns.TYPE_PAGER, preferred );
617
613
                }
618
614
 
619
615
                public void parseEMAIL( String[] params, String value )