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

  • Committer: Tim Marston
  • Date: 2014-03-01 17:35:04 UTC
  • Revision ID: tim@ed.am-20140301173504-jh4komxn4u058omh
updated family picture

Show diffs side-by-side

added added

removed removed

433
433
                        Matcher m = p.matcher( email );
434
434
                        if( m.matches() ) {
435
435
                                String[] bits = email.split( "@" );
436
 
                                return bits[ 0 ] + "@" +
437
 
                                        bits[ 1 ].toLowerCase( Locale.ENGLISH );
 
436
                                return bits[ 0 ] + "@" + bits[ 1 ].toLowerCase( Locale.US );
438
437
                        }
439
438
                        return null;
440
439
                }
544
543
                finish( ACTION_ABORT );
545
544
        }
546
545
 
547
 
        protected void showContinueOrAbort( int res ) throws AbortImportException
548
 
        {
549
 
                showContinueOrAbort( _doit.getText( res ).toString() );
550
 
        }
551
 
 
552
 
        synchronized protected void showContinueOrAbort( String message )
 
546
        protected void showFatalError( int res ) throws AbortImportException
 
547
        {
 
548
                showFatalError( _doit.getText( res ).toString() );
 
549
        }
 
550
 
 
551
        synchronized protected void showFatalError( String message )
 
552
                        throws AbortImportException
 
553
        {
 
554
                checkAbort();
 
555
                _doit._handler.sendMessage( Message.obtain(
 
556
                        _doit._handler, Doit.MESSAGE_ERROR, message ) );
 
557
                try {
 
558
                        wait();
 
559
                }
 
560
                catch( InterruptedException e ) { }
 
561
 
 
562
                // no need to check if an abortion happened during the wait, we are
 
563
                // about to finish anyway!
 
564
                finish( ACTION_ABORT );
 
565
        }
 
566
 
 
567
        protected boolean showContinue( int res ) throws AbortImportException
 
568
        {
 
569
                return showContinue( _doit.getText( res ).toString() );
 
570
        }
 
571
 
 
572
        synchronized protected boolean showContinue( String message )
553
573
                        throws AbortImportException
554
574
        {
555
575
                checkAbort();
560
580
                }
561
581
                catch( InterruptedException e ) { }
562
582
 
563
 
                // if we're aborting, there's no need to check if an abortion happened
564
 
                // during the wait
565
 
                if( _response == RESPONSE_NEGATIVE )
566
 
                        finish( ACTION_ABORT );
567
 
                else
568
 
                        checkAbort();
 
583
                // check if an abortion happened during the wait
 
584
                checkAbort();
 
585
 
 
586
                return _response == RESPONSE_POSITIVE;
569
587
        }
570
588
 
571
589
        protected void setProgressMessage( int res ) throws AbortImportException