* #25549 List refresh properly
Fixed small connected issues
diff --git a/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java b/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
index e01ddef..726fffc 100644
--- a/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
+++ b/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
@@ -31,142 +31,93 @@
 public class AccountDetailsHandler {
     private static final String TAG = "AccountDetailsHandler";
 
-    public static class PreferenceEntry
-    {
+    public static class PreferenceEntry {
         public String mKey;
         public int mLabelId;
 
-        public PreferenceEntry(String key, int labelId)
-        {
+        public PreferenceEntry(String key, int labelId) {
             mKey = key;
             mLabelId = labelId;
         }
     }
 
-    public static ArrayList<PreferenceEntry> getBasicDetailsKeys()
-    {
+    public static ArrayList<PreferenceEntry> getBasicDetailsKeys() {
         ArrayList<PreferenceEntry> basicDetailKeys = new ArrayList<PreferenceEntry>();
 
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_TYPE,
-                            R.string.account_type_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ALIAS,
-                            R.string.account_alias_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ENABLE,
-                            R.string.account_enabled_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_HOSTNAME,
-                            R.string.account_hostname_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_USERNAME,
-                            R.string.account_username_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ROUTESET,
-                            R.string.account_routeset_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_PASSWORD,
-                            R.string.account_password_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REALM,
-                            R.string.account_realm_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM,
-                            R.string.account_useragent_label));
-        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_USERAGENT,
-                            R.string.account_autoanswer_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_TYPE, R.string.account_type_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ALIAS, R.string.account_alias_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ENABLE, R.string.account_enabled_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_HOSTNAME, R.string.account_hostname_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_USERNAME, R.string.account_username_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_ROUTESET, R.string.account_routeset_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, R.string.account_password_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REALM, R.string.account_realm_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM, R.string.account_useragent_label));
+        basicDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_USERAGENT, R.string.account_autoanswer_label));
 
         return basicDetailKeys;
     }
 
-    public static ArrayList<PreferenceEntry> getAdvancedDetailsKeys()
-    {
+    public static ArrayList<PreferenceEntry> getAdvancedDetailsKeys() {
         ArrayList<PreferenceEntry> advancedDetailKeys = new ArrayList<PreferenceEntry>();
 
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE,
-                            R.string.account_registration_exp_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS,
-                            R.string.account_registration_status_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_CODE,
-                            R.string.account_registration_code_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_DESC,
-                            R.string.account_registration_state_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_CREDENTIAL_NUMBER,
-                            R.string.account_credential_count_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_DTMF_TYPE,
-                            R.string.account_config_dtmf_type_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_RINGTONE_PATH,
-                            R.string.account_ringtone_path_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_RINGTONE_ENABLED,
-                            R.string.account_ringtone_enabled_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_KEEP_ALIVE_ENABLED,
-                            R.string.account_keep_alive_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_AUTOANSWER,
-                            R.string.account_autoanswer_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_LOCAL_INTERFACE,
-                            R.string.account_local_interface_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_SAMEAS_LOCAL,
-                            R.string.account_published_same_as_local_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_LOCAL_PORT,
-                            R.string.account_local_port_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_PORT,
-                            R.string.account_published_port_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_ADDRESS,
-                            R.string.account_published_address_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_DISPLAY_NAME,
-                            R.string.account_displayname_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_STUN_SERVER,
-                            R.string.account_stun_server_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_STUN_ENABLE,
-                            R.string.account_stun_enable_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_ENABLE,
-                            R.string.account_srtp_enabled_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE,
-                            R.string.account_srtp_exchange_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO,
-                            R.string.account_encryption_algo_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK,
-                            R.string.account_srtp_fallback_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_HELLO_HASH,
-                            R.string.account_hello_hash_enable_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS,
-                            R.string.account_display_sas_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING,
-                            R.string.account_not_supported_warning_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS_ONCE,
-                            R.string.account_display_sas_once_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_LISTENER_PORT,
-                            R.string.account_listener_port_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_ENABLE,
-                            R.string.account_tls_enabled_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CA_LIST_FILE,
-                            R.string.account_tls_certificate_list_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CERTIFICATE_FILE,
-                            R.string.account_tls_certificate_file_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_PRIVATE_KEY_FILE,
-                            R.string.account_tls_private_key_file_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_PASSWORD,
-                            R.string.account_tls_password_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_METHOD,
-                            R.string.account_tls_method_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CIPHERS,
-                            R.string.account_tls_ciphers_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_SERVER_NAME,
-                            R.string.account_tls_server_name_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_VERIFY_SERVER,
-                            R.string.account_tls_verify_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_VERIFY_CLIENT,
-                            R.string.account_tls_verify_client_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE, R.string.account_registration_exp_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS, R.string.account_registration_status_label));
+        advancedDetailKeys
+                .add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_CODE, R.string.account_registration_code_label));
+        advancedDetailKeys
+                .add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_DESC, R.string.account_registration_state_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_CREDENTIAL_NUMBER, R.string.account_credential_count_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_DTMF_TYPE, R.string.account_config_dtmf_type_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_RINGTONE_PATH, R.string.account_ringtone_path_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_RINGTONE_ENABLED, R.string.account_ringtone_enabled_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_KEEP_ALIVE_ENABLED, R.string.account_keep_alive_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ACCOUNT_AUTOANSWER, R.string.account_autoanswer_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_LOCAL_INTERFACE, R.string.account_local_interface_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_SAMEAS_LOCAL, R.string.account_published_same_as_local_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_LOCAL_PORT, R.string.account_local_port_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_PORT, R.string.account_published_port_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_PUBLISHED_ADDRESS, R.string.account_published_address_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_DISPLAY_NAME, R.string.account_displayname_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_STUN_SERVER, R.string.account_stun_server_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_STUN_ENABLE, R.string.account_stun_enable_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_ENABLE, R.string.account_srtp_enabled_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE, R.string.account_srtp_exchange_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO, R.string.account_encryption_algo_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK, R.string.account_srtp_fallback_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_HELLO_HASH, R.string.account_hello_hash_enable_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS, R.string.account_display_sas_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING, R.string.account_not_supported_warning_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS_ONCE, R.string.account_display_sas_once_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_LISTENER_PORT, R.string.account_listener_port_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_ENABLE, R.string.account_tls_enabled_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CA_LIST_FILE, R.string.account_tls_certificate_list_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CERTIFICATE_FILE, R.string.account_tls_certificate_file_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_PRIVATE_KEY_FILE, R.string.account_tls_private_key_file_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_PASSWORD, R.string.account_tls_password_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_METHOD, R.string.account_tls_method_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_CIPHERS, R.string.account_tls_ciphers_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_SERVER_NAME, R.string.account_tls_server_name_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_VERIFY_SERVER, R.string.account_tls_verify_label));
+        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_VERIFY_CLIENT, R.string.account_tls_verify_client_label));
         advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE,
-                            R.string.account_tls_require_client_certificat_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC,
-                            R.string.account_tls_negotiation_timeout_sec));
+                R.string.account_tls_require_client_certificat_label));
+        advancedDetailKeys
+                .add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC, R.string.account_tls_negotiation_timeout_sec));
         advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_MSEC,
-                            R.string.account_tls_negotiation_timeout_msec));
+                R.string.account_tls_negotiation_timeout_msec));
 
-        return advancedDetailKeys; 
+        return advancedDetailKeys;
     }
 
-    public static StringMap convertFromNativeToSwig(HashMap<String, String> nativemap)
-    {
+    public static StringMap convertFromNativeToSwig(HashMap<String, String> nativemap) {
         StringMap swigmap = new StringMap();
 
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_ALIAS, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_ALIAS));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_HOSTNAME, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_HOSTNAME));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_USERNAME, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_USERNAME));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
+        System.out.println(nativemap.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_ROUTESET, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_ROUTESET));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE));
 
@@ -193,7 +144,7 @@
         swigmap.set(ServiceConstants.CONFIG_RINGTONE_ENABLED, nativemap.get(ServiceConstants.CONFIG_RINGTONE_ENABLED));
         swigmap.set(ServiceConstants.CONFIG_RINGTONE_PATH, nativemap.get(ServiceConstants.CONFIG_RINGTONE_PATH));
         swigmap.set(ServiceConstants.CONFIG_ACCOUNT_USERAGENT, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_USERAGENT));
-            
+
         swigmap.set(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE, nativemap.get(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE));
         swigmap.set(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK, nativemap.get(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK));
         swigmap.set(ServiceConstants.CONFIG_STUN_ENABLE, nativemap.get(ServiceConstants.CONFIG_STUN_ENABLE));
@@ -219,7 +170,7 @@
         swigmap.set(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING, nativemap.get(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING));
 
         return swigmap;
-    } 
+    }
 
     public static HashMap<String, String> convertSwigToNative(StringMap swigmap) {
 
@@ -231,13 +182,13 @@
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_ROUTESET, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_ROUTESET));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_EXPIRE));
-            
+
         nativemap.put(ServiceConstants.CONFIG_LOCAL_INTERFACE, swigmap.get(ServiceConstants.CONFIG_LOCAL_INTERFACE));
         nativemap.put(ServiceConstants.CONFIG_STUN_SERVER, swigmap.get(ServiceConstants.CONFIG_STUN_SERVER));
         nativemap.put(ServiceConstants.CONFIG_TLS_ENABLE, swigmap.get(ServiceConstants.CONFIG_TLS_ENABLE));
         nativemap.put(ServiceConstants.CONFIG_SRTP_ENABLE, swigmap.get(ServiceConstants.CONFIG_SRTP_ENABLE));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_TYPE, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_TYPE));
-            
+
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_MAILBOX, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_MAILBOX));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_ENABLE, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_ENABLE));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS));
@@ -255,7 +206,7 @@
         nativemap.put(ServiceConstants.CONFIG_RINGTONE_ENABLED, swigmap.get(ServiceConstants.CONFIG_RINGTONE_ENABLED));
         nativemap.put(ServiceConstants.CONFIG_RINGTONE_PATH, swigmap.get(ServiceConstants.CONFIG_RINGTONE_PATH));
         nativemap.put(ServiceConstants.CONFIG_ACCOUNT_USERAGENT, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_USERAGENT));
-            
+
         nativemap.put(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE, swigmap.get(ServiceConstants.CONFIG_SRTP_KEY_EXCHANGE));
         nativemap.put(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK, swigmap.get(ServiceConstants.CONFIG_SRTP_RTP_FALLBACK));
         nativemap.put(ServiceConstants.CONFIG_STUN_ENABLE, swigmap.get(ServiceConstants.CONFIG_STUN_ENABLE));
@@ -281,20 +232,20 @@
         nativemap.put(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING, swigmap.get(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING));
 
         /*
-        nativemap.put(ServiceConstants.CONFIG_CREDENTIAL_NUMBER, swigmap.get(ServiceConstants.CONFIG_CREDENTIAL_NUMBER));
-        nativemap.put(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
-        nativemap.put(ServiceConstants.CONFIG_ACCOUNT_REALM, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
-        */
+         * nativemap.put(ServiceConstants.CONFIG_CREDENTIAL_NUMBER, swigmap.get(ServiceConstants.CONFIG_CREDENTIAL_NUMBER));
+         * nativemap.put(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
+         * nativemap.put(ServiceConstants.CONFIG_ACCOUNT_REALM, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
+         */
 
         /*
-        nativemap.put(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM));
-        nativemap.put(ServiceConstants.CONFIG_INTERFACE, swigmap.get(ServiceConstants.CONFIG_INTERFACE));
-        nativemap.put(ServiceConstants.CONFIG_DEFAULT_INTERFACE, swigmap.get(ServiceConstants.CONFIG_DEFAULT_INTERFACE));
-        nativemap.put(ServiceConstants.CONFIG_DISPLAY_NAME, swigmap.get(ServiceConstants.CONFIG_DISPLAY_NAME));
-        nativemap.put(ServiceConstants.CONFIG_DEFAULT_ADDRESS, swigmap.get(ServiceConstants.CONFIG_DEFAULT_ADDRESS));
-        nativemap.put(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO, swigmap.get(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO));
-        */
+         * nativemap.put(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM, swigmap.get(ServiceConstants.CONFIG_ACCOUNT_DEFAULT_REALM));
+         * nativemap.put(ServiceConstants.CONFIG_INTERFACE, swigmap.get(ServiceConstants.CONFIG_INTERFACE));
+         * nativemap.put(ServiceConstants.CONFIG_DEFAULT_INTERFACE, swigmap.get(ServiceConstants.CONFIG_DEFAULT_INTERFACE));
+         * nativemap.put(ServiceConstants.CONFIG_DISPLAY_NAME, swigmap.get(ServiceConstants.CONFIG_DISPLAY_NAME));
+         * nativemap.put(ServiceConstants.CONFIG_DEFAULT_ADDRESS, swigmap.get(ServiceConstants.CONFIG_DEFAULT_ADDRESS));
+         * nativemap.put(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO, swigmap.get(ServiceConstants.CONFIG_SRTP_ENCRYPTION_ALGO));
+         */
 
         return nativemap;
     }
-}; 
+};
diff --git a/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java b/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
index 13e848a..f4da144 100644
--- a/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
@@ -105,6 +105,8 @@
             break;
         }
 
+        getActionBar().setDisplayHomeAsUpEnabled(true);
+        
         requiredFields = new ArrayList<String>();
         requiredFields.add(AccountDetailBasic.CONFIG_ACCOUNT_ALIAS);
         requiredFields.add(AccountDetailBasic.CONFIG_ACCOUNT_HOSTNAME);
@@ -189,11 +191,15 @@
         }
 
     }
+    
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
 
         switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
         case R.id.menuitem_delete:
             AlertDialog dialog = createDeleteDialog();
             dialog.show();
@@ -243,6 +249,7 @@
         for (String s : requiredFields) {
             EditTextPreference pref = (EditTextPreference) mPreferenceManager.findPreference(s);
             Log.i(TAG, "Looking for " + s);
+            Log.i(TAG, "Value " + pref.getText());
             if (pref.getText().isEmpty()) {
                 Log.i(TAG, "    INVALIDATED " + s + " " + pref.getText() + ";");
                 valid = false;
@@ -276,6 +283,7 @@
     Preference.OnPreferenceChangeListener changeBasicPreferenceListener = new Preference.OnPreferenceChangeListener() {
         public boolean onPreferenceChange(Preference preference, Object newValue) {
             preference.setSummary((CharSequence) newValue);
+            Log.i(TAG,"Changing preference value:" + (CharSequence) newValue);
             basicDetails.setDetailString(preference.getOrder(), ((CharSequence) newValue).toString());
             return true;
         }
diff --git a/src/com/savoirfairelinux/sflphone/client/CallActivity.java b/src/com/savoirfairelinux/sflphone/client/CallActivity.java
index 2bc177c..a07421f 100644
--- a/src/com/savoirfairelinux/sflphone/client/CallActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/CallActivity.java
@@ -58,7 +58,7 @@
 import com.savoirfairelinux.sflphone.interfaces.CallInterface;
 import com.savoirfairelinux.sflphone.model.SipCall;
 import com.savoirfairelinux.sflphone.model.SipCall.state;
-import com.savoirfairelinux.sflphone.receiver.CallReceiver;
+import com.savoirfairelinux.sflphone.receivers.CallReceiver;
 import com.savoirfairelinux.sflphone.service.CallManagerCallBack;
 import com.savoirfairelinux.sflphone.service.ISipService;
 import com.savoirfairelinux.sflphone.service.SipService;
@@ -90,6 +90,7 @@
 		slidingPaneLayout = (CallPaneLayout) findViewById(R.id.slidingpanelayout);
 		//slidingPaneLayout.
 		// slidingPaneLayout.requestDisallowInterceptTouchEvent(disallowIntercept)
+//		Toast.makeText(this, getIntent().getData().toString(), Toast.LENGTH_LONG).show();
 		slidingPaneLayout.setPanelSlideListener(new SlidingPaneLayout.PanelSlideListener() {
 
 			@Override
diff --git a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
index 5c5b596..3ccb500 100644
--- a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
@@ -68,8 +68,8 @@
 import com.savoirfairelinux.sflphone.interfaces.CallInterface;
 import com.savoirfairelinux.sflphone.model.CallContact;
 import com.savoirfairelinux.sflphone.model.SipCall;
-import com.savoirfairelinux.sflphone.receiver.AccountsReceiver;
-import com.savoirfairelinux.sflphone.receiver.CallReceiver;
+import com.savoirfairelinux.sflphone.receivers.AccountsReceiver;
+import com.savoirfairelinux.sflphone.receivers.CallReceiver;
 import com.savoirfairelinux.sflphone.service.CallManagerCallBack;
 import com.savoirfairelinux.sflphone.service.ConfigurationManagerCallback;
 import com.savoirfairelinux.sflphone.service.ISipService;
@@ -433,6 +433,8 @@
 
         switch (requestCode) {
         case REQUEST_CODE_PREFERENCES:
+            Log.w(TAG, "Result out of PreferenceActivity");
+            ((DialingFragment)mSectionsPagerAdapter.getItem(0)).updateAllAccounts();
             break;
         case REQUEST_CODE_CALL:
             Log.w(TAG, "Result out of CallActivity");
diff --git a/src/com/savoirfairelinux/sflphone/client/SFLPhonePreferenceActivity.java b/src/com/savoirfairelinux/sflphone/client/SFLPhonePreferenceActivity.java
index 6d2643f..05ded16 100644
--- a/src/com/savoirfairelinux/sflphone/client/SFLPhonePreferenceActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/SFLPhonePreferenceActivity.java
@@ -45,6 +45,7 @@
 import android.support.v13.app.FragmentStatePagerAdapter;
 import android.support.v4.view.ViewPager;
 import android.util.Log;
+import android.view.MenuItem;
 
 import com.savoirfairelinux.sflphone.R;
 import com.savoirfairelinux.sflphone.fragments.AccountManagementFragment;
@@ -52,15 +53,14 @@
 import com.savoirfairelinux.sflphone.service.ISipService;
 import com.savoirfairelinux.sflphone.service.SipService;
 
-public class SFLPhonePreferenceActivity extends Activity implements ActionBar.TabListener
-{
+public class SFLPhonePreferenceActivity extends Activity implements ActionBar.TabListener {
     static final int NUM_PAGES = 2;
     static final String TAG = SFLPhonePreferenceActivity.class.getSimpleName();
     PreferencesPagerAdapter mPreferencesPagerAdapter;
     private boolean mBound = false;
     static boolean serviceIsOn = false;
     private ISipService service;
-    
+
     ViewPager mViewPager;
 
     private ServiceConnection mConnection = new ServiceConnection() {
@@ -69,6 +69,14 @@
         public void onServiceConnected(ComponentName className, IBinder binder) {
             service = ISipService.Stub.asInterface(binder);
             mBound = true;
+            mPreferencesPagerAdapter = new PreferencesPagerAdapter(getFragmentManager());
+            mViewPager.setAdapter(mPreferencesPagerAdapter);
+            getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+            for (int i = 0; i < mPreferencesPagerAdapter.getCount(); i++) {
+                getActionBar().addTab(
+                        getActionBar().newTab().setText(mPreferencesPagerAdapter.getPageTitle(i)).setTabListener(SFLPhonePreferenceActivity.this));
+
+            }
             Log.d(TAG, "Service connected");
         }
 
@@ -76,40 +84,28 @@
         public void onServiceDisconnected(ComponentName arg0) {
             mBound = false;
             Log.d(TAG, "Service disconnected");
-        } 
+        }
     };
 
     @Override
-    public void onCreate(Bundle savedInstanceState)
-    {
+    public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        Log.i(TAG,"onCreate SFLPhonePreferenceActivity");
+        Log.i(TAG, "onCreate SFLPhonePreferenceActivity");
 
         setContentView(R.layout.activity_sflphone_preferences);
 
-        mPreferencesPagerAdapter = new PreferencesPagerAdapter(getFragmentManager());
-
-        final ActionBar actionBar = getActionBar();
-        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
-
         mViewPager = (ViewPager) findViewById(R.id.preferences_pager);
-	mViewPager.setAdapter(mPreferencesPagerAdapter);
-
-        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener()
-        {
+        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
             @Override
-            public void onPageSelected(int position)
-            {
-                actionBar.setSelectedNavigationItem(position);
+            public void onPageSelected(int position) {
+                getActionBar().setSelectedNavigationItem(position);
             }
         });
 
-        for(int i = 0; i < mPreferencesPagerAdapter.getCount(); i++) {
-            actionBar.addTab(actionBar.newTab().setText(mPreferencesPagerAdapter.getPageTitle(i)).setTabListener(this));
-        }
+        getActionBar().setDisplayHomeAsUpEnabled(true);
 
-        if(!mBound) {
+        if (!mBound) {
             Log.i(TAG, "onCreate: Binding service...");
             Intent intent = new Intent(this, SipService.class);
             bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
@@ -117,6 +113,17 @@
     }
 
     @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+        case android.R.id.home:
+            finish();
+            return true;
+        default:
+            return true;
+        }
+    }
+
+    @Override
     protected void onStart() {
         Log.i(TAG, "onStart");
         super.onStart();
@@ -131,13 +138,13 @@
     protected void onDestroy() {
         Log.i(TAG, "onDestroy: stopping SipService...");
 
-        if(mBound) {
+        if (mBound) {
             unbindService(mConnection);
             mBound = false;
         }
 
-//        stopService(new Intent(this, SipService.class));
-//        serviceIsOn = false;
+        // stopService(new Intent(this, SipService.class));
+        // serviceIsOn = false;
         super.onDestroy();
     }
 
@@ -146,37 +153,31 @@
     }
 
     @Override
-    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction)
-    {
+    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
     }
 
     @Override
-    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction)
-    {
+    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
         mViewPager.setCurrentItem(tab.getPosition());
     }
 
     @Override
-    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction)
-    {
+    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
     }
 
     public class PreferencesPagerAdapter extends FragmentStatePagerAdapter {
 
-        public PreferencesPagerAdapter(FragmentManager fm) 
-        {
+        public PreferencesPagerAdapter(FragmentManager fm) {
             super(fm);
         }
 
         @Override
-        public int getCount() 
-        {
+        public int getCount() {
             return NUM_PAGES;
         }
 
         @Override
-        public Fragment getItem(int position) 
-        {
+        public Fragment getItem(int position) {
             Fragment fragment;
 
             switch (position) {
@@ -195,9 +196,8 @@
         }
 
         @Override
-        public CharSequence getPageTitle(int position)
-        {
-            switch(position) {
+        public CharSequence getPageTitle(int position) {
+            switch (position) {
             case 0:
                 return getString(R.string.preference_section1).toUpperCase();
             case 1:
diff --git a/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java b/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
index c3e3e54..a257d81 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
@@ -61,6 +61,7 @@
 import com.savoirfairelinux.sflphone.client.SFLphoneApplication;
 import com.savoirfairelinux.sflphone.service.ConfigurationManagerCallback;
 import com.savoirfairelinux.sflphone.service.ISipService;
+import com.savoirfairelinux.sflphone.service.ServiceConstants;
 
 public class AccountManagementFragment extends PreferenceFragment {
     static final String TAG = "AccountManagementFragment";
@@ -151,7 +152,9 @@
 
                 HashMap<String, String> accountDetails = new HashMap<String, String>();
                 accountDetails = (HashMap<String, String>) bundle.getSerializable(AccountDetail.TAG);
-
+                
+                Log.w(TAG,"realm "+accountDetails.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
+                
                 Preference accountScreen = accountPreferenceHashMap.get(accountID);
                 mRoot.removePreference(accountScreen);
                 accountPreferenceHashMap.remove(accountID);
diff --git a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
index f50defb..853d0ff 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
@@ -75,6 +75,8 @@
     AccountSelectionAdapter mAdapter;
     private Callbacks mCallbacks = sDummyCallbacks;
     private Spinner spinnerAccounts;
+    
+    private static final int ACCOUNTS_LOADER = 555; 
 
     /**
      * A dummy implementation of the {@link Callbacks} interface that does nothing. Used only when this fragment is not attached to an activity.
@@ -226,7 +228,7 @@
 
             mAdapter = new AccountSelectionAdapter(getActivity(), service, new ArrayList<Account>());
             spinnerAccounts.setAdapter(mAdapter);
-            getActivity().getLoaderManager().initLoader(555, null, this);
+            getActivity().getLoaderManager().initLoader(ACCOUNTS_LOADER, null, this);
         }
 
     }
@@ -252,7 +254,7 @@
     }
 
     public void updateAllAccounts() {
-        getActivity().getLoaderManager().initLoader(555, null, this);
+        getActivity().getLoaderManager().restartLoader(ACCOUNTS_LOADER, null, this);
 
     }
 
diff --git a/src/com/savoirfairelinux/sflphone/fragments/MenuFragment.java b/src/com/savoirfairelinux/sflphone/fragments/MenuFragment.java
index 7ac0f81..e147452 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/MenuFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/MenuFragment.java
@@ -67,7 +67,7 @@
             public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long arg3) {
                if(pos == 1 || pos == 2 || pos == 3){
                    Intent launchPreferencesIntent = new Intent().setClass(getActivity(), SFLPhonePreferenceActivity.class);
-                   startActivityForResult(launchPreferencesIntent, SFLPhoneHomeActivity.REQUEST_CODE_PREFERENCES);
+                   getActivity().startActivityForResult(launchPreferencesIntent, SFLPhoneHomeActivity.REQUEST_CODE_PREFERENCES);
                }
                 
             }
diff --git a/src/com/savoirfairelinux/sflphone/model/BubblesView.java b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
index 8446b2c..6aab070 100644
--- a/src/com/savoirfairelinux/sflphone/model/BubblesView.java
+++ b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
@@ -1,3 +1,35 @@
+/*

+ *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.

+ *

+ *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>

+ *  Adrien Béraud <adrien.beraud@gmail.com>

+ *

+ *  This program is free software; you can redistribute it and/or modify

+ *  it under the terms of the GNU General Public License as published by

+ *  the Free Software Foundation; either version 3 of the License, or

+ *  (at your option) any later version.

+ *

+ *  This program is distributed in the hope that it will be useful,

+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of

+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

+ *  GNU General Public License for more details.

+ *

+ *  You should have received a copy of the GNU General Public License

+ *  along with this program; if not, write to the Free Software

+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

+ *

+ *  Additional permission under GNU GPL version 3 section 7:

+ *

+ *  If you modify this program, or any covered work, by linking or

+ *  combining it with the OpenSSL project's OpenSSL library (or a

+ *  modified version of that library), containing parts covered by the

+ *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.

+ *  grants you additional permission to convey the resulting work.

+ *  Corresponding Source for a non-source form of such a combination

+ *  shall include the source code for the parts of OpenSSL used as well

+ *  as that of the covered work.

+ */

+

 package com.savoirfairelinux.sflphone.model;

 

 import java.util.List;

diff --git a/src/com/savoirfairelinux/sflphone/receiver/AccountsReceiver.java b/src/com/savoirfairelinux/sflphone/receivers/AccountsReceiver.java
similarity index 95%
rename from src/com/savoirfairelinux/sflphone/receiver/AccountsReceiver.java
rename to src/com/savoirfairelinux/sflphone/receivers/AccountsReceiver.java
index 3a9424c..98a409b 100644
--- a/src/com/savoirfairelinux/sflphone/receiver/AccountsReceiver.java
+++ b/src/com/savoirfairelinux/sflphone/receivers/AccountsReceiver.java
@@ -1,4 +1,4 @@
-package com.savoirfairelinux.sflphone.receiver;
+package com.savoirfairelinux.sflphone.receivers;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java b/src/com/savoirfairelinux/sflphone/receivers/CallReceiver.java
similarity index 95%
rename from src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java
rename to src/com/savoirfairelinux/sflphone/receivers/CallReceiver.java
index a9eff4a..78d3ebb 100644
--- a/src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java
+++ b/src/com/savoirfairelinux/sflphone/receivers/CallReceiver.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
+ *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
  *
  *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
  *
@@ -28,7 +28,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
-package com.savoirfairelinux.sflphone.receiver;
+package com.savoirfairelinux.sflphone.receivers;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java b/src/com/savoirfairelinux/sflphone/receivers/ExternalCallReceiver.java
similarity index 60%
copy from src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java
copy to src/com/savoirfairelinux/sflphone/receivers/ExternalCallReceiver.java
index a9eff4a..57a30ce 100644
--- a/src/com/savoirfairelinux/sflphone/receiver/CallReceiver.java
+++ b/src/com/savoirfairelinux/sflphone/receivers/ExternalCallReceiver.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
+ *  Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
  *
  *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
  *
@@ -28,41 +28,31 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
-package com.savoirfairelinux.sflphone.receiver;
+
+package com.savoirfairelinux.sflphone.receivers;
+
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.util.Log;
 
-import com.savoirfairelinux.sflphone.interfaces.CallInterface;
-import com.savoirfairelinux.sflphone.service.CallManagerCallBack;
+/**
+ * External Receiver, registered in Android System
+ * @author lisional
+ *
+ */
+public class ExternalCallReceiver extends BroadcastReceiver
+{
 
-public class CallReceiver extends BroadcastReceiver{
-    
-    static final String TAG = CallReceiver.class.getSimpleName();
+    @Override
+    public void onReceive(Context context, Intent intent)
+    {
+        String incomingNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
+        Log.d("NewOutgoingCallReceiver", ">>>>>> Intent.EXTRA_PHONE_NUMBER: " + incomingNumber);
+        //setResultData(null);
 
-    CallInterface callback;
-    
-    public CallReceiver(CallInterface client){
-        callback = client;
+
     }
-    
-	@Override
-	public void onReceive(Context context, Intent intent)
-	{
-	    if( intent.getAction().contentEquals(CallManagerCallBack.INCOMING_CALL)){
-	        callback.incomingCall(intent);
-	    } else if (intent.getAction().contentEquals(CallManagerCallBack.INCOMING_TEXT)){
-	        callback.incomingText(intent);
-	    } else if(intent.getAction().contentEquals(CallManagerCallBack.CALL_STATE_CHANGED)){
-	        callback.callStateChanged(intent);
-	    } else {
-	        Log.e(TAG, "Unknown action: "+intent.getAction());
-	    }
-
-	}
-	
-	
 
 }
diff --git a/src/com/savoirfairelinux/sflphone/receiver/IncomingReceiver.java b/src/com/savoirfairelinux/sflphone/receivers/IncomingReceiver.java
similarity index 98%
rename from src/com/savoirfairelinux/sflphone/receiver/IncomingReceiver.java
rename to src/com/savoirfairelinux/sflphone/receivers/IncomingReceiver.java
index 922e9fd..94216ab 100644
--- a/src/com/savoirfairelinux/sflphone/receiver/IncomingReceiver.java
+++ b/src/com/savoirfairelinux/sflphone/receivers/IncomingReceiver.java
@@ -1,4 +1,4 @@
-package com.savoirfairelinux.sflphone.receiver;
+package com.savoirfairelinux.sflphone.receivers;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
diff --git a/src/com/savoirfairelinux/sflphone/service/SipService.java b/src/com/savoirfairelinux/sflphone/service/SipService.java
index 745c064..b36b97f 100644
--- a/src/com/savoirfairelinux/sflphone/service/SipService.java
+++ b/src/com/savoirfairelinux/sflphone/service/SipService.java
@@ -27,6 +27,7 @@
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
@@ -57,7 +58,7 @@
 import com.savoirfairelinux.sflphone.client.SFLPhoneHomeActivity;
 import com.savoirfairelinux.sflphone.client.SFLphoneApplication;
 import com.savoirfairelinux.sflphone.model.SipCall;
-import com.savoirfairelinux.sflphone.receiver.IncomingReceiver;
+import com.savoirfairelinux.sflphone.receivers.IncomingReceiver;
 
 public class SipService extends Service {
 
@@ -74,7 +75,7 @@
     private ConfigurationManagerCallback configurationManagerCallback;
     private ManagerImpl managerImpl;
     private boolean isPjSipStackStarted = false;
-    
+
     public static final String NOTIF_CREATION = "notif_creation";
     public static final String NOTIF_DELETION = "notif_deletion";
 
@@ -98,8 +99,6 @@
 
         sflphoneApp = (SFLphoneApplication) getApplication();
         sipServiceThread = new SipServiceThread();
-        
-        
 
         IntentFilter callFilter = new IntentFilter(CallManagerCallBack.CALL_STATE_CHANGED);
         callFilter.addAction(CallManagerCallBack.INCOMING_CALL);
@@ -109,12 +108,10 @@
         callFilter.addAction(CallManagerCallBack.INCOMING_TEXT);
 
         LocalBroadcastManager.getInstance(this).registerReceiver(receiver, callFilter);
-        
-        getExecutor().execute(new StartRunnable());
-        
-    }
-    
 
+        getExecutor().execute(new StartRunnable());
+
+    }
 
     /* called for each startService() */
     @Override
@@ -493,7 +490,7 @@
         }
 
         @Override
-        public void setAccountDetails(final String accountId, Map map) {
+        public void setAccountDetails(final String accountId, final Map map) {
             HashMap<String, String> nativemap = (HashMap<String, String>) map;
 
             final StringMap swigmap = AccountDetailsHandler.convertFromNativeToSwig(nativemap);
@@ -501,12 +498,45 @@
             getExecutor().execute(new SipRunnable() {
                 @Override
                 protected void doRun() throws SameThreadException {
-                    Log.i(TAG, "SipService.setAccountDetails() thread running...");
+
+                    configurationManagerJNI.setCredentials(accountId, extractCredentials(map));
                     configurationManagerJNI.setAccountDetails(accountId, swigmap);
+
+                    convertSwigToNative(configurationManagerJNI.getCredentials(accountId));
+                    Log.i(TAG, "SipService.setAccountDetails() thread running...");
+                }
+
+                private VectMap extractCredentials(Map map) {
+                    VectMap swigmap = new VectMap();
+                    StringMap entry = new StringMap();
+                    entry.set(ServiceConstants.CONFIG_ACCOUNT_USERNAME, (String) map.get(ServiceConstants.CONFIG_ACCOUNT_USERNAME));
+                    if((String) map.get(ServiceConstants.CONFIG_ACCOUNT_REALM) != null)
+                        entry.set(ServiceConstants.CONFIG_ACCOUNT_REALM, (String) map.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
+                    else
+                        entry.set(ServiceConstants.CONFIG_ACCOUNT_REALM, "*");
+                    entry.set(ServiceConstants.CONFIG_ACCOUNT_PASSWORD, (String) map.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
+                    swigmap.add(entry);
+                    return swigmap;
+
                 }
             });
         }
 
+        public ArrayList<HashMap<String, String>> convertSwigToNative(VectMap swigmap) {
+
+            ArrayList<HashMap<String, String>> nativemap = new ArrayList<HashMap<String, String>>();
+            Log.i(TAG, "swigmap size " + swigmap.size());
+            for (int i = 0; i < swigmap.size(); ++i) {
+                Log.i(TAG, "Entry " + i);
+                StringMap tmp = swigmap.get(i);
+                Log.i(TAG, tmp.get(ServiceConstants.CONFIG_ACCOUNT_USERNAME));
+//                Log.i(TAG, tmp.get(ServiceConstants.CONFIG_ACCOUNT_REALM));
+                Log.i(TAG, tmp.get(ServiceConstants.CONFIG_ACCOUNT_PASSWORD));
+            }
+
+            return nativemap;
+        }
+
         @Override
         public String addAccount(Map map) {
             class AddAccount extends SipRunnableWithReturn {
@@ -894,41 +924,44 @@
         @Override
         public void createNotification() throws RemoteException {
             makeNotification();
-            
+
         }
 
         @Override
         public void destroyNotification() throws RemoteException {
             removeNotification();
-            
+
         }
-        
+
         private int NOTIFICATION_ID = new Random().nextInt(1000);
-        
+
         private void makeNotification() {
-            if(current_calls.size() == 0){
+            if (current_calls.size() == 0) {
                 return;
             }
             Intent notificationIntent = new Intent(getApplicationContext(), SFLPhoneHomeActivity.class);
-            PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 007, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
+            PendingIntent contentIntent = PendingIntent.getActivity(getApplicationContext(), 007, notificationIntent,
+                    PendingIntent.FLAG_UPDATE_CURRENT);
 
             NotificationManager nm = (NotificationManager) getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
 
             NotificationCompat.Builder builder = new NotificationCompat.Builder(getBaseContext());
-    //
-//            builder.setContent(view);
-            builder.setContentIntent(contentIntent).setOngoing(true).setSmallIcon(R.drawable.ic_launcher).setContentTitle(getCurrent_calls().size()+" ongoing calls").setTicker("Pending calls").setWhen(System.currentTimeMillis()).setAutoCancel(false);
+            //
+            // builder.setContent(view);
+            builder.setContentIntent(contentIntent).setOngoing(true).setSmallIcon(R.drawable.ic_launcher)
+                    .setContentTitle(getCurrent_calls().size() + " ongoing calls").setTicker("Pending calls").setWhen(System.currentTimeMillis())
+                    .setAutoCancel(false);
             builder.setPriority(NotificationCompat.PRIORITY_MAX);
             Notification n = builder.build();
 
             nm.notify(NOTIFICATION_ID, n);
-            
+
         }
 
         public void removeNotification() {
             NotificationManager nm = (NotificationManager) getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
             nm.cancel(NOTIFICATION_ID);
-            
+
         }
 
     };