Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/HostListActivity.java @ 359:93621e963303
allow eula agreement to be set from deployment.connections
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 03 Aug 2014 11:26:03 -0700 |
parents | 071eccdff8ea |
children | 5b0636e6a910 |
comparison
equal
deleted
inserted
replaced
358:37f4a3b506d9 | 359:93621e963303 |
---|---|
177 editor.putBoolean(PreferenceConstants.CTRL_FKEYS, true); | 177 editor.putBoolean(PreferenceConstants.CTRL_FKEYS, true); |
178 editor.commit(); | 178 editor.commit(); |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 // check for eula agreement | |
183 boolean agreed = prefs.getBoolean(PreferenceConstants.EULA, false); | |
184 | |
185 if (!agreed) { | |
186 startActivityForResult(new Intent(this, WizardActivity.class), REQUEST_EULA); | |
187 } | |
188 | |
189 makingShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction()) | 182 makingShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction()) |
190 || Intent.ACTION_PICK.equals(getIntent().getAction()); | 183 || Intent.ACTION_PICK.equals(getIntent().getAction()); |
191 // connect with hosts database and populate list | 184 |
185 // connect with hosts database, read deployment file, and populate list | |
192 hostdb = new HostDatabase(this); | 186 hostdb = new HostDatabase(this); |
193 createDeploymentHosts(); // build hosts from a deployment text file | 187 createDeploymentHosts(); // build hosts from a deployment text file |
194 updateList(); | 188 updateList(); |
189 | |
190 // check for eula agreement, which might be set from the deployment file | |
191 boolean agreed = prefs.getBoolean(PreferenceConstants.EULA, false); | |
192 if (!agreed) { | |
193 startActivityForResult(new Intent(this, WizardActivity.class), REQUEST_EULA); | |
194 } | |
195 | |
196 // show the list | |
195 sortedByColor = prefs.getBoolean(PreferenceConstants.SORT_BY_COLOR, false); | 197 sortedByColor = prefs.getBoolean(PreferenceConstants.SORT_BY_COLOR, false); |
196 registerForContextMenu(getListView()); | 198 registerForContextMenu(getListView()); |
197 getListView().setOnItemClickListener(new OnItemClickListener() { | 199 getListView().setOnItemClickListener(new OnItemClickListener() { |
198 | 200 |
199 public synchronized void onItemClick(AdapterView<?> parent, View view, int position, long id) { | 201 public synchronized void onItemClick(AdapterView<?> parent, View view, int position, long id) { |