changeset 199:33928f24b40d

read deployment.connections on startup for global preferences also
author Carl Byington <carl@five-ten-sg.com>
date Wed, 02 Jul 2014 21:00:25 -0700
parents a9fb5061cca3
children 6cc9a9e622bc
files src/com/five_ten_sg/connectbot/HostListActivity.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/HostListActivity.java	Wed Jul 02 18:46:17 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/HostListActivity.java	Wed Jul 02 21:00:25 2014 -0700
@@ -172,7 +172,7 @@
         if (Build.MANUFACTURER.equals("HTC") && Build.DEVICE.equals("dream")) {
             if (!prefs.contains(PreferenceConstants.SHIFT_FKEYS) &&
                     !prefs.contains(PreferenceConstants.CTRL_FKEYS)) {
-                SharedPreferences.Editor editor = prefs.edit();
+                Editor editor = prefs.edit();
                 editor.putBoolean(PreferenceConstants.SHIFT_FKEYS, true);
                 editor.putBoolean(PreferenceConstants.CTRL_FKEYS, true);
                 editor.commit();
@@ -416,7 +416,7 @@
                     values.put(parts[0].trim(), parts[1].trim());
                 }
                 if (uri.getScheme().equals("global")) {
-                    SharedPreferences.Editor editor = prefs.edit();
+                    Editor editor = prefs.edit();
                     HashMap<String,String> types = new HashMap<String,String>();
                     types.put("memkeys", "boolean");
                     types.put("update", "string");
@@ -461,21 +461,25 @@
                             char stype = types.get(key).charAt(0);
                             switch (stype) {
                                 case 'b':
+                                    boolean bx = prefs.getBoolean(key, true);
                                     boolean bv = values.getAsBoolean(key);
                                     editor.putBoolean(key, bv);
                                     break;
 
                                 case 'i':
+                                    int ix = prefs.getInt(key, 0);
                                     int iv = values.getAsInteger(key);
                                     editor.putInt(key, iv);
                                     break;
 
                                 case 'f':
+                                    float fx = prefs.getFloat(key, 1.0f);
                                     float fv = values.getAsFloat(key);
                                     editor.putFloat(key, fv);
                                     break;
 
                                 case 's':
+                                    String sx = prefs.getString(key, "");
                                     String sv = values.getAsString(key);
                                     editor.putString(key, sv);
                                     break;