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

  • Committer: edam
  • Date: 2011-06-04 16:52:28 UTC
  • Revision ID: edam@waxworlds.org-20110604165228-jam230oo29u1m06u
- properly handle multiple TYPE= params in one entry in a v3.0 vCard
- when deciding which phone number to use as the pimary number, a voice number takes precedence over a non-voice (fax or pager) number of the same standing in terms of being preferred or not.

Show diffs side-by-side

added added

removed removed

33
33
 
34
34
public class WizardActivity extends Activity
35
35
{
36
 
        private Class< ? > _nextClass;
 
36
        private Class< ? > _next_class;
37
37
 
38
38
        @Override
39
 
        protected void onCreate( Bundle savedInstanceState )
 
39
        protected void onCreate( Bundle saved_instance_state )
40
40
        {
41
 
                super.onCreate( savedInstanceState );
 
41
                super.onCreate( saved_instance_state );
42
42
 
43
43
                // enable back button based on intent data
44
44
                Bundle extras = getIntent().getExtras();
63
63
        }
64
64
 
65
65
        @Override
66
 
        protected void  onActivityResult( int requestCode, int resultCode, Intent data )
 
66
        protected void onActivityResult( int request_code, int result_code,
 
67
                Intent data )
67
68
        {
68
 
                if( resultCode == RESULT_OK ) {
 
69
                if( result_code == RESULT_OK ) {
69
70
                        setResult( RESULT_OK );
70
71
                        finish();
71
72
                }
76
77
                // create bundle with back enabled state
77
78
                Bundle bundle = new Bundle();
78
79
                bundle.putBoolean( "back-enabled", true );
79
 
                Intent i = new Intent( this, _nextClass );
 
80
                Intent i = new Intent( this, _next_class );
80
81
                i.putExtras( bundle );
81
82
 
82
83
                // start next activity
91
92
 
92
93
        protected void setNextActivity( Class< ? > cls )
93
94
        {
94
 
                _nextClass = cls;
 
95
                _next_class = cls;
95
96
 
96
97
                // enable next button
97
98
                ( (Button)findViewById( R.id.next ) ).setEnabled( true );
103
104
        }
104
105
 
105
106
        @Override
106
 
        public void onConfigurationChanged( Configuration newConfig ) {
107
 
                super.onConfigurationChanged( newConfig );
 
107
        public void onConfigurationChanged( Configuration new_config ) {
 
108
                super.onConfigurationChanged( new_config );
108
109
        }
109
110
}