/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-03-17 12:06:34 UTC
  • Revision ID: tim@ed.am-20130317120634-6zjm03f76egvyo46
check for and refuse to import Nokia vMsg files

Show diffs side-by-side

added added

removed removed

133
133
                        boolean in_vcard = false;
134
134
                        while( ( line = reader.readLine() ) != null )
135
135
                        {
136
 
                                if( !in_vcard ) {
 
136
                                if( !in_vcard )
 
137
                                {
137
138
                                        // look for vcard beginning
138
139
                                        if( line.matches( "^BEGIN[ \t]*:[ \t]*VCARD.*$" ) ) {
139
140
                                                in_vcard = true;
140
141
                                                _vcard_count++;
141
142
                                        }
 
143
                                        // check for vMsg files
 
144
                                        else if( line.matches( "^BEGIN[ \t]*:[ \t]*VMSG.*$" ) ) {
 
145
                                                showError( getText( R.string.error_vcf_vmsgfile )
 
146
                                                        + file.getName() );
 
147
                                        }
142
148
                                }
143
149
                                else if( line.matches( "^END[ \t]*:[ \t]*VCARD.*$" ) )
144
150
                                        in_vcard = false;