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

  • Committer: edam
  • Date: 2010-12-12 11:25:00 UTC
  • Revision ID: edam@waxworlds.org-20101212112500-ml96qi57t0epia2s
- import phone numbers even when they have no specified type (default to mobile)
- allow all keypad chars in a phone number so that network commands can be prefixed to them

Show diffs side-by-side

added added

removed removed

648
648
        private String sanitisePhoneNumber( String number )
649
649
        {
650
650
                number = number.replaceAll( "[-\\(\\) ]", "" );
651
 
                Pattern p = Pattern.compile( "^\\+?[0-9]+" );
 
651
                Pattern p = Pattern.compile( "^[\\+0-9#*]+" );
652
652
                Matcher m = p.matcher( number );
653
653
                if( m.lookingAt() ) return m.group( 0 );
654
654
                return null;