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

  • Committer: edam
  • Date: 2009-01-13 06:37:52 UTC
  • Revision ID: edam@waxworlds.org-20090113063752-kjbyjqksaez1g7uv
updated todo list

Show diffs side-by-side

added added

removed removed

62
62
        public final static int MESSAGE_CONTACTMERGED = 12;
63
63
        public final static int MESSAGE_CONTACTSKIPPED = 13;
64
64
 
65
 
        public final static int ACTION_PROMPT = 0;
66
 
        public final static int ACTION_KEEP = 1;
67
 
        public final static int ACTION_MERGE_MERGE = 2;
68
 
        public final static int ACTION_OVERWRITE = 3;
69
 
 
70
65
        private boolean _startedProgress;
71
66
        private int _maxProgress;
72
67
        private int _tmpProgress;
289
284
                        int responseExtra = _mergePromptAlwaysSelected?
290
285
                                        Importer.RESPONSEEXTRA_ALWAYS : Importer.RESPONSEEXTRA_NONE;
291
286
                        Doit.this._mergePromptDialog.dismiss();
292
 
                        Doit.this._mergePromptDialog = null;    // don't keep a reference!
293
 
                        Doit.this._importer.wake( convertIdToAction( view.getId() ),
294
 
                                        responseExtra );
 
287
                        Doit.this._mergePromptDialog = null;    // dont keep a reference!
 
288
                        Doit.this._importer.wake( view.getId(), responseExtra );
295
289
                }
296
290
        };
297
291
 
298
 
        public static int convertIdToAction( int id ) {
299
 
                switch( id ) {
300
 
                case R.id.merge_keep:           return ACTION_KEEP;
301
 
                case R.id.merge_merge:          return ACTION_MERGE_MERGE;
302
 
                case R.id.merge_overwrite:      return ACTION_OVERWRITE;
303
 
                default: return ACTION_PROMPT;
304
 
                }
305
 
        }
306
 
 
307
 
        public static int convertActionToId( int action ) {
308
 
                switch( action ) {
309
 
                case ACTION_KEEP:               return R.id.merge_keep;
310
 
                case ACTION_MERGE_MERGE:return R.id.merge_merge;
311
 
                case ACTION_OVERWRITE:  return R.id.merge_overwrite;
312
 
                default: return R.id.merge_prompt;
313
 
                }
314
 
        }
315
 
 
316
292
        private DialogInterface.OnCancelListener _dialogOnCancelListener =
317
293
                        new DialogInterface.OnCancelListener() {
318
294
                public void onCancel( DialogInterface dialog ) {