/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/FileChooser.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

29
29
import java.util.ArrayList;
30
30
import java.util.Collections;
31
31
import java.util.Comparator;
 
32
import java.util.Locale;
32
33
 
33
34
import android.app.AlertDialog;
34
35
import android.app.Dialog;
195
196
        // set the path prefix
196
197
        public void setPathPrefix( String path_prefix )
197
198
        {
198
 
                // set to cleaned-up path, with trailaing '/' removed so that it can be
 
199
                // set to cleaned-up path, with trailing '/' removed so that it can be
199
200
                // trivially pre-pended to a cleaned-up path
200
201
                _path_prefix = cleanUpPath( path_prefix );
201
202
                _path_prefix = _path_prefix.substring( 0, _path_prefix.length() - 1 );
247
248
                }
248
249
        };
249
250
 
250
 
        private OnItemClickListener _fileChooserItemClickListener = new OnItemClickListener() {
251
 
                public void onItemClick( AdapterView< ? > adapterView, View view, int position, long id )
 
251
        private OnItemClickListener _fileChooserItemClickListener =
 
252
                        new OnItemClickListener() {
 
253
                public void onItemClick( AdapterView< ? > adapter_view, View view,
 
254
                        int position, long id )
252
255
                {
253
256
                        RowItem rowitem = _items.get( position );
254
257
 
423
426
                                public boolean accept( File file ) {
424
427
                                        if( file.isDirectory() || file.getName().startsWith( "." ) )
425
428
                                                return false;
426
 
                                        String filename = file.getName().toLowerCase();
 
429
                                        String filename =
 
430
                                                file.getName().toLowerCase( Locale.ENGLISH );
427
431
                                        for( int i = 0; i < _extensions.length; i++ )
428
432
                                                if( filename.endsWith( "." + _extensions[ i ] ) )
429
433
                                                        return true;