/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-01 18:03:39 UTC
  • Revision ID: tim@ed.am-20140301180339-rmfh8x7wys2inc65
new family pic

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