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

  • Committer: Tim Marston
  • Date: 2015-12-05 01:58:35 UTC
  • Revision ID: tim@ed.am-20151205015835-ggzzffm5d4xp8hrp
updated family pic

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * Doit.java
3
3
 *
4
 
 * Copyright (C) 2009 Tim Marston <edam@waxworlds.org>
 
4
 * Copyright (C) 2009 Tim Marston <tim@ed.am>
5
5
 *
6
6
 * This file is part of the Import Contacts program (hereafter referred
7
 
 * to as "this program"). For more information, see
8
 
 * http://www.waxworlds.org/edam/software/android/import-contacts
 
7
 * to as "this program").  For more information, see
 
8
 * http://ed.am/dev/android/import-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
11
11
 * it under the terms of the GNU General Public License as published by
21
21
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 */
23
23
 
24
 
package org.waxworlds.edam.importcontacts;
 
24
package am.ed.importcontacts;
25
25
 
26
26
import android.app.AlertDialog;
27
27
import android.app.Dialog;
220
220
                                                public void onClick( DialogInterface dialog,
221
221
                                                        int whichButton )
222
222
                                                {
223
 
                                                        Doit.this._importer.wake();
 
223
                                                        if( Doit.this != null )
 
224
                                                                Doit.this._importer.wake();
224
225
                                                }
225
226
                                        } )
226
227
                                .setOnCancelListener( _dialog_on_cancel_listener )
235
236
                                                public void onClick( DialogInterface dialog,
236
237
                                                        int which_button )
237
238
                                                {
238
 
                                                        Doit.this._importer.wake(
239
 
                                                                Importer.RESPONSE_POSITIVE );
 
239
                                                        if( Doit.this != null )
 
240
                                                                Doit.this._importer.wake(
 
241
                                                                        Importer.RESPONSE_POSITIVE );
240
242
                                                }
241
243
                                        } )
242
244
                                .setNegativeButton( R.string.error_abort,
244
246
                                                public void onClick( DialogInterface dialog,
245
247
                                                        int which_button )
246
248
                                                {
247
 
                                                        Doit.this._importer.wake(
248
 
                                                                Importer.RESPONSE_NEGATIVE );
 
249
                                                        if( Doit.this != null )
 
250
                                                                Doit.this._importer.wake(
 
251
                                                                        Importer.RESPONSE_NEGATIVE );
249
252
                                                }
250
253
                                        } )
251
254
                                .setOnCancelListener( _dialog_on_cancel_listener )
261
264
                                                public void onCheckedChanged(
262
265
                                                        CompoundButton button_view, boolean is_checked )
263
266
                                                {
264
 
                                                        Doit.this._merge_prompt_always_selected =
265
 
                                                                is_checked;
 
267
                                                        if( Doit.this != null )
 
268
                                                                Doit.this._merge_prompt_always_selected =
 
269
                                                                        is_checked;
266
270
                                                }
267
271
                                        } );
268
272
                        ( (Button)dialog_view.findViewById( R.id.merge_keep ) ).
289
293
        {
290
294
                public void onClick( View view )
291
295
                {
 
296
                        if( Doit.this == null ) return;
 
297
 
292
298
                        // handle abort
293
299
                        if( view.getId() == R.id.abort )
294
300
                                manualAbort();
432
438
                ( (Button)findViewById( R.id.back ) ).setEnabled( false );
433
439
 
434
440
                // create importer
435
 
                _importer = new VCFImporter( this );
 
441
                _importer = new VcardImporter( this );
436
442
 
437
443
                // start the service's thread
438
444
                _importer.start();