/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/VcardImporter.java

  • Committer: Tim Marston
  • Date: 2013-06-22 17:29:31 UTC
  • Revision ID: tim@ed.am-20130622172931-ujydoni23t3a543b
minor style tweaks

Show diffs side-by-side

added added

removed removed

4
4
 * Copyright (C) 2009 to 2011 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Import Contacts program (hereafter referred
7
 
 * to as "this program"). For more information, see
 
7
 * to as "this program").  For more information, see
8
8
 * http://ed.am/dev/android/import-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
273
273
                                                        finish( ACTION_ABORT );
274
274
                                                }
275
275
 
276
 
                                                // although we're continuing, we still need to abort
277
 
                                                // this vCard. Further lines will be ignored until we
 
276
                                                // Although we're continuing, we still need to abort
 
277
                                                // this vCard.  Further lines will be ignored until we
278
278
                                                // get to another BEGIN:VCARD line.
279
279
                                                vcard = null;
280
280
                                        }
281
281
                                        catch( Vcard.SkipImportException e ) {
282
282
                                                skipContact();
283
 
                                                // abort this vCard. Further lines will be ignored until
 
283
                                                // Abort this vCard.  Further lines will be ignored until
284
284
                                                // we get to another BEGIN:VCARD line.
285
285
                                                vcard = null;
286
286
                                        }
752
752
                        {
753
753
                                String str = parts.get( a );
754
754
 
755
 
                                // look for parts that end in an escape character, but ignore
756
 
                                // the final part. We've already detected escape chars at the
 
755
                                // Look for parts that end in an escape character, but ignore
 
756
                                // the final part.  We've already detected escape chars at the
757
757
                                // end of the final part in parseLine() and handled multi-lines
758
758
                                // accordingly.
759
759
                                if( a < parts.size() - 1 &&
1042
1042
 
1043
1043
                /**
1044
1044
                 * Amongst the params, find the value of the first, only, of any with
1045
 
                 * the specified name
 
1045
                 * the specified name.
 
1046
                 *
1046
1047
                 * @param params
1047
1048
                 * @param name
1048
1049
                 * @return a value, or null
1054
1055
                }
1055
1056
 
1056
1057
                /**
1057
 
                 * Amongst the params, find the values of any with the specified name
 
1058
                 * Amongst the params, find the values of any with the specified name.
 
1059
                 *
1058
1060
                 * @param params
1059
1061
                 * @param name
1060
1062
                 * @return an array of values, or null
1076
1078
                }
1077
1079
 
1078
1080
                /**
1079
 
                 * Amongst the params, return any type values present. For v2.1 vCards,
1080
 
                 * those types are just parameters. For v3.0, they are prefixed with
1081
 
                 * "TYPE=". There may also be multiple type parameters.
 
1081
                 * Amongst the params, return any type values present.  For v2.1 vCards,
 
1082
                 * those types are just parameters.  For v3.0, they are prefixed with
 
1083
                 * "TYPE=".  There may also be multiple type parameters.
 
1084
                 *
1082
1085
                 * @param params an array of params to look for types in
1083
1086
                 * @param valid_types an list of upper-case type values to look for
1084
1087
                 * @return a set of present type values
1136
1139
                                else if( ch == '=' && i == in.limit() - 1 )
1137
1140
                                {
1138
1141
                                        // we found a '=' at the end of a line signifying a multi-
1139
 
                                        // line string, so we don't add it.
 
1142
                                        // line string, so we don't add it
1140
1143
                                        another = true;
1141
1144
                                        continue;
1142
1145
                                }