changeset 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 37f4a3b506d9
children 7eb24880b111
files deployment.connections src/com/five_ten_sg/connectbot/HostListActivity.java
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/deployment.connections	Sun Aug 03 11:16:40 2014 -0700
+++ b/deployment.connections	Sun Aug 03 11:26:03 2014 -0700
@@ -59,6 +59,7 @@
 #   keepalive                   (boolean)
 #   wifilock                    (boolean)
 #   bumpyarrows                 (boolean)
+#   eula                        (boolean)
 #   extended_longpress          (boolean)
 #   ctrl_string                 (string)
 #   picker_string               (string)
@@ -87,6 +88,7 @@
     voldn=Tab
     search=None
     ptt=Monitor Key
+    eula=true
 
 #
 # end
--- a/src/com/five_ten_sg/connectbot/HostListActivity.java	Sun Aug 03 11:16:40 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/HostListActivity.java	Sun Aug 03 11:26:03 2014 -0700
@@ -179,19 +179,21 @@
             }
         }
 
-        // check for eula agreement
+        makingShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())
+                         || Intent.ACTION_PICK.equals(getIntent().getAction());
+
+        // connect with hosts database, read deployment file,  and populate list
+        hostdb = new HostDatabase(this);
+        createDeploymentHosts();    // build hosts from a deployment text file
+        updateList();
+
+        // check for eula agreement, which might be set from the deployment file
         boolean agreed = prefs.getBoolean(PreferenceConstants.EULA, false);
-
         if (!agreed) {
             startActivityForResult(new Intent(this, WizardActivity.class), REQUEST_EULA);
         }
 
-        makingShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction())
-                         || Intent.ACTION_PICK.equals(getIntent().getAction());
-        // connect with hosts database and populate list
-        hostdb = new HostDatabase(this);
-        createDeploymentHosts();    // build hosts from a deployment text file
-        updateList();
+        // show the list
         sortedByColor = prefs.getBoolean(PreferenceConstants.SORT_BY_COLOR, false);
         registerForContextMenu(getListView());
         getListView().setOnItemClickListener(new OnItemClickListener() {