/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: 2011-03-13 18:18:07 UTC
  • Revision ID: edam@waxworlds.org-20110313181807-3smjm2m3bt8hahr8
- check for empty data "values" after parsing line parameters, so that we catch parameter errors (such as unknown encoding types).

Show diffs side-by-side

added added

removed removed

431
431
                                }
432
432
                                else
433
433
                                {
434
 
                                        // ignore empty values
435
 
                                        if( string_value.length() < 1 ) return;
436
 
 
437
434
                                        // calculate how many chars to skip from beginning of line
438
435
                                        // so we skip the property "name:" part
439
436
                                        int pos = buffer.position() + name_and_params.length() + 1;
477
474
                                if( encoding != null && encoding.equals( "QUOTED-PRINTABLE" ) )
478
475
                                        unencoding_result = unencodeQuotedPrintable( value );
479
476
//                              else if( encoding != null && encoding.equals( "BASE64" ) )
480
 
//                                      result = unencodeBase64( props[ 1 ], charset );
 
477
//                                      unencoding_result = unencodeBase64( props[ 1 ], charset );
481
478
                                if( unencoding_result != null ) {
482
479
                                        value = unencoding_result.getBuffer();
483
480
                                        _parser_in_multiline =
509
506
                                String complete_value =
510
507
                                        _parser_buffered_value_so_far + string_value;
511
508
 
 
509
                                // ignore empty values
 
510
                                if( complete_value.length() < 1 ) return;
 
511
 
512
512
                                // parse some properties
513
513
                                if( name_param_parts[ 0 ].equals( "N" ) )
514
514
                                        parseN( name_param_parts, complete_value );