/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-01 18:07:36 UTC
  • Revision ID: tim@ed.am-20140301180736-ow8n7rsmbcboabgf
removed hard-coded path to sdcard

Show diffs side-by-side

added added

removed removed

382
382
                finish( ACTION_ABORT );
383
383
        }
384
384
 
385
 
        protected void showContinueOrAbort( int res ) throws AbortExportException
386
 
        {
387
 
                showContinueOrAbort( _doit.getText( res ).toString() );
388
 
        }
389
 
 
390
 
        synchronized protected void showContinueOrAbort( String message )
 
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 )
391
412
                        throws AbortExportException
392
413
        {
393
414
                checkAbort();
398
419
                }
399
420
                catch( InterruptedException e ) { }
400
421
 
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();
 
422
                // check if an abortion happened during the wait
 
423
                checkAbort();
 
424
 
 
425
                return _response == RESPONSE_POSITIVE;
407
426
        }
408
427
 
409
428
        protected void setProgressMessage( int res ) throws AbortExportException