/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/VcardExporter.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

55
55
 
56
56
                // check if the output file already exists
57
57
                if( file.exists() && file.length() > 0 )
58
 
                        showContinue( R.string.error_vcf_exists );
 
58
                        if( !showContinue( R.string.error_vcf_exists ) )
 
59
                                finish( ACTION_ABORT );
59
60
 
60
61
                // open file
61
62
                try {
82
83
                        // length of the line we'll be pulling off
83
84
                        int len = 75;
84
85
 
 
86
                        // if splitting at this length would break apart a codepoint, use
 
87
                        // one less char
 
88
                        if( Character.isHighSurrogate( line.charAt( len - 1 ) ) )
 
89
                                len--;
 
90
 
85
91
                        // count how many backslashes would be at the end of the line we're
86
92
                        // pulling off
87
93
                        int count = 0;