/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/am/ed/exportcontacts/Exporter.java

  • Committer: Tim Marston
  • Date: 2014-03-02 11:03:07 UTC
  • Revision ID: tim@ed.am-20140302110307-nnrn9dhfnjg06lve
removed some unused code, fixed locale warnings and made showContinueOrAbort()
abort implicitly (rather than return false); added check for unidentifiable
contacts; fixed spelling mistake

Show diffs side-by-side

added added

removed removed

382
382
                finish( ACTION_ABORT );
383
383
        }
384
384
 
385
 
        protected void showFatalError( int res ) throws AbortExportException
386
 
        {
387
 
                showFatalError( _doit.getText( res ).toString() );
388
 
        }
389
 
 
390
 
        synchronized protected void showFatalError( String message )
391
 
                        throws AbortExportException
392
 
        {
393
 
                checkAbort();
394
 
                _doit._handler.sendMessage( Message.obtain(
395
 
                        _doit._handler, Doit.MESSAGE_ERROR, message ) );
396
 
                try {
397
 
                        wait();
398
 
                }
399
 
                catch( InterruptedException e ) { }
400
 
 
401
 
                // no need to check if an abortion happened during the wait, we are
402
 
                // about to finish anyway!
403
 
                finish( ACTION_ABORT );
404
 
        }
405
 
 
406
 
        protected boolean showContinue( int res ) throws AbortExportException
407
 
        {
408
 
                return showContinue( _doit.getText( res ).toString() );
409
 
        }
410
 
 
411
 
        synchronized protected boolean showContinue( String message )
 
385
        protected void showContinueOrAbort( int res ) throws AbortExportException
 
386
        {
 
387
                showContinueOrAbort( _doit.getText( res ).toString() );
 
388
        }
 
389
 
 
390
        synchronized protected void showContinueOrAbort( String message )
412
391
                        throws AbortExportException
413
392
        {
414
393
                checkAbort();
419
398
                }
420
399
                catch( InterruptedException e ) { }
421
400
 
422
 
                // check if an abortion happened during the wait
423
 
                checkAbort();
424
 
 
425
 
                return _response == RESPONSE_POSITIVE;
 
401
                // if we're aborting, there's no need to check if an abortion happened
 
402
                // during the wait
 
403
                if( _response == RESPONSE_NEGATIVE )
 
404
                        finish( ACTION_ABORT );
 
405
                else
 
406
                        checkAbort();
426
407
        }
427
408
 
428
409
        protected void setProgressMessage( int res ) throws AbortExportException