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

  • Committer: edam
  • Date: 2010-10-17 18:43:13 UTC
  • Revision ID: edam@waxworlds.org-20101017184313-y2m6gsdzctjq5wtl
- changed case on charset and encoding warning strings (it looked bad)
- properly handle quoted-printable unencoding (including multi-line values)
- ignore blank lines in vCard
- ignore empty properties in vCard

Show diffs side-by-side

added added

removed removed

200
200
        {
201
201
                super.onPause();
202
202
 
 
203
                // close any open dialogs
 
204
                try {
 
205
                        dismissDialog( _currentDialogId );
 
206
                }
 
207
                catch( Exception e ) {
 
208
                }
 
209
 
203
210
                // saving the state of an import sounds complicated! Lets just abort!
204
 
                if( _nextAction != NEXT_CLOSE )
205
 
                        manualAbort( true );
 
211
                manualAbort( true );
206
212
        }
207
213
 
208
214
        @Override
290
296
                        if( view.getId() == R.id.abort )
291
297
                                manualAbort();
292
298
 
293
 
                        // else, response (just check we haven't aborted already!)
294
 
                        else if( Doit.this._importer != null ) {
 
299
                        // else, response
 
300
                        else {
295
301
                                int responseExtra = _mergePromptAlwaysSelected?
296
302
                                                Importer.RESPONSEEXTRA_ALWAYS : Importer.RESPONSEEXTRA_NONE;
297
303
                                Doit.this._importer.wake( convertIdToAction( view.getId() ),
338
344
                        setVisibility( View.VISIBLE );
339
345
                ( (TextView)findViewById( R.id.doit_alldone ) ).
340
346
                        setVisibility( View.GONE );
341
 
 
342
 
                // close any open dialogs
343
 
                try {
344
 
                        dismissDialog( _currentDialogId );
345
 
                }
346
 
                catch( Exception e ) {
347
 
                }
348
347
        }
349
348
 
350
349
        private void updateNext( int nextAction )
379
378
        private DialogInterface.OnCancelListener _dialogOnCancelListener =
380
379
                        new DialogInterface.OnCancelListener() {
381
380
                public void onCancel( DialogInterface dialog ) {
382
 
                        manualAbort();
 
381
                        setResult( RESULT_CANCELED );
 
382
                        finish();
383
383
                }
384
384
        };
385
385
 
386
 
 
387
386
        @Override
388
387
        protected void onActivityResult( int requestCode, int resultCode,
389
388
                        Intent data )