- public int getInt(String key, int def) {
- return prefs.getInt(key, def);
- }
-
- public String getString(String key, String def) {
- return prefs.getString(key, def);
- }
-
- public void putBoolean(String key, boolean value) {
- editor.putBoolean(key, value);
- }
-
- public void putDouble(String key, double value) {
- editor.putFloat(key, (float)value);
- }
+ if (address != null && name != null)
+ active_device_address = new DeviceAddress (address, name);