/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: edam
  • Date: 2012-12-21 15:53:59 UTC
  • Revision ID: tim@ed.am-20121221155359-p8h3n0xhtulmwva0
fixed column values in Contacts backend; don't write-out empty notes; remember to close my queries; switched from wrappers to static valueOf() functions; fix line-endings (should be \r\n)

Show diffs side-by-side

added added

removed removed

4
4
 * Copyright (C) 2010 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Export Contacts program (hereafter referred
7
 
 * to as "this program").  For more information, see
 
7
 * to as "this program"). For more information, see
8
8
 * http://ed.am/dev/android/export-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
195
195
        // set the path prefix
196
196
        public void setPathPrefix( String path_prefix )
197
197
        {
198
 
                // 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
199
199
                // trivially pre-pended to a cleaned-up path
200
200
                _path_prefix = cleanUpPath( path_prefix );
201
201
                _path_prefix = _path_prefix.substring( 0, _path_prefix.length() - 1 );
247
247
                }
248
248
        };
249
249
 
250
 
        private OnItemClickListener _fileChooserItemClickListener =
251
 
                        new OnItemClickListener() {
252
 
                public void onItemClick( AdapterView< ? > adapter_view, View view,
253
 
                        int position, long id )
 
250
        private OnItemClickListener _fileChooserItemClickListener = new OnItemClickListener() {
 
251
                public void onItemClick( AdapterView< ? > adapterView, View view, int position, long id )
254
252
                {
255
253
                        RowItem rowitem = _items.get( position );
256
254
 
370
368
                if( path.startsWith( _path_prefix + "/" ) )
371
369
                        path = path.substring( _path_prefix.length() );
372
370
 
373
 
                // unless path is "/", strip trailing "/"
 
371
                // unless path is "/", strip trailing "/".
374
372
                if( path.length() > 1 && path.endsWith( "/" ) )
375
373
                        path = path.substring( 0, path.length() - 1 );
376
374