* #23395 bug fixed in Account Edition
Switch Account Local Interface preference EditTextPreference to ListPreference to display only available interfaces
Deleted Account.interface preference and Account.default_realm
* #23362 Added layout item_history
Date and duration of the call are displayed
diff --git a/res/layout/frag_history.xml b/res/layout/frag_history.xml
index ab2e1ae..5e11e78 100644
--- a/res/layout/frag_history.xml
+++ b/res/layout/frag_history.xml
@@ -2,7 +2,9 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical"
+    android:paddingLeft="8dp"
+    android:paddingRight="8dp" >
 
     <ListView
         android:id="@id/android:list"
diff --git a/res/layout/item_history.xml b/res/layout/item_history.xml
new file mode 100644
index 0000000..8386954
--- /dev/null
+++ b/res/layout/item_history.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2004-2012 Savoir-Faire Linux Inc.                     
+                                                                    
+Author: Adrien Beraud <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.
+-->
+<com.savoirfairelinux.sflphone.client.CallElementView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/panel"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <!-- android:minHeight="70dp" > -->
+
+    <RelativeLayout
+        android:id="@+id/contactview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@drawable/box_border" >
+
+        <ImageButton
+            android:id="@+id/toggleButton1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentLeft="true"
+            android:background="#00000000"
+            android:drawableLeft="@drawable/call_pause"
+            android:gravity="left|center_vertical"
+            android:src="@drawable/call_pause"
+            android:visibility="gone" />
+
+        <ImageView
+            android:id="@+id/photo"
+            android:layout_width="70dp"
+            android:layout_height="70dp"
+            android:scaleType="centerCrop"
+            android:src="@drawable/box_border" />
+
+        <TextView
+            android:id="@+id/display_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentTop="true"
+            android:layout_toRightOf="@+id/photo"
+            android:paddingLeft="@dimen/padding_small"
+            android:paddingTop="@dimen/padding_small"
+            android:textAppearance="?android:attr/textAppearanceMedium" />
+
+        <TextView
+            android:id="@+id/duration"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/display_name"
+            android:layout_toRightOf="@+id/photo"
+            android:paddingBottom="@dimen/padding_small"
+            android:paddingLeft="@dimen/padding_small"
+            android:text="Small Text"
+            android:textAppearance="?android:attr/textAppearanceSmall" />
+
+        <TextView
+            android:id="@+id/date_start"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/display_name"
+            android:layout_toRightOf="@+id/duration"
+            android:paddingBottom="@dimen/padding_small"
+            android:paddingLeft="@dimen/padding_small"
+            android:text="Small Text"
+            android:textAppearance="?android:attr/textAppearanceSmall" />
+
+        <!--
+        <ImageButton
+            android:id="@+id/imageButton1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:background="#00000000"
+            android:src="@android:drawable/sym_action_call" />
+        -->
+    </RelativeLayout>
+
+</com.savoirfairelinux.sflphone.client.CallElementView>
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5ea9b6b..6a83a4d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -70,7 +70,6 @@
         <string name="account_keep_alive_label">Keep Alive</string>
 
         <string name="account_local_interface_label">Local Interface</string>
-        <string name="account_account_interface_label">Account Interface</string>
         <string name="account_published_same_as_local_label">Published Port Same As Local</string>
         <string name="account_local_port_label">Local Port</string>
         <string name="account_published_port_label">Published Port</string>
diff --git a/res/xml/account_creation_preferences.xml b/res/xml/account_creation_preferences.xml
index 3c06f2c..26aa2b7 100644
--- a/res/xml/account_creation_preferences.xml
+++ b/res/xml/account_creation_preferences.xml
@@ -169,20 +169,13 @@
         android:persistent="false"
         android:defaultValue="false"
         android:title="Keep Alive"/>
-    <EditTextPreference
+    <ListPreference
         android:id="@+id/account_creation_local_interface"
         android:key="Account.localInterface"
         android:persistent="false"
         android:defaultValue="wlan0"
         android:title="Local Interface"
         android:summary="wlan0"/>
-    <EditTextPreference
-        android:id="@+id/account_creation_interface"
-        android:key="Account.interface"
-        android:persistent="false"
-        android:defaultValue="wlan0"
-        android:title="Interface"
-        android:summary="wlan0"/>
     <CheckBoxPreference
         android:id="@+id/account_creation_published_sameas_local"
         android:key="Account.publishedSameAsLocal"
diff --git a/src/com/savoirfairelinux/sflphone/account/AccountDetailAdvanced.java b/src/com/savoirfairelinux/sflphone/account/AccountDetailAdvanced.java
index 04de9ff..aab05a6 100644
--- a/src/com/savoirfairelinux/sflphone/account/AccountDetailAdvanced.java
+++ b/src/com/savoirfairelinux/sflphone/account/AccountDetailAdvanced.java
@@ -49,7 +49,6 @@
 
     public static final String CONFIG_ACCOUNT_AUTOANSWER = "Account.autoAnswer";
     public static final String CONFIG_LOCAL_INTERFACE = "Account.localInterface";
-    public static final String CONFIG_INTERFACE = "Account.interface";
     public static final String CONFIG_PUBLISHED_SAMEAS_LOCAL = "Account.publishedSameAsLocal";
     public static final String CONFIG_LOCAL_PORT = "Account.localPort";
     public static final String CONFIG_PUBLISHED_PORT = "Account.publishedPort";
@@ -80,9 +79,8 @@
         preference.add(new PreferenceEntry(CONFIG_RINGTONE_PATH, R.string.account_ringtone_path_label));
         preference.add(new PreferenceEntry(CONFIG_RINGTONE_ENABLED, R.string.account_ringtone_enabled_label, true));
         preference.add(new PreferenceEntry(CONFIG_KEEP_ALIVE_ENABLED, R.string.account_keep_alive_label, true));
-        preference.add(new PreferenceEntry(CONFIG_ACCOUNT_AUTOANSWER, R.string.account_account_interface_label, true));
+        preference.add(new PreferenceEntry(CONFIG_ACCOUNT_AUTOANSWER, R.string.account_autoanswer_label, true));
         preference.add(new PreferenceEntry(CONFIG_LOCAL_INTERFACE, R.string.account_local_interface_label));
-        preference.add(new PreferenceEntry(CONFIG_INTERFACE, R.string.account_account_interface_label));
         preference.add(new PreferenceEntry(CONFIG_PUBLISHED_SAMEAS_LOCAL, R.string.account_published_same_as_local_label, true));
         preference.add(new PreferenceEntry(CONFIG_LOCAL_PORT, R.string.account_local_port_label));
         preference.add(new PreferenceEntry(CONFIG_PUBLISHED_PORT, R.string.account_published_port_label));
@@ -119,6 +117,7 @@
             int index = 0;
             for(String s : pref) {
                 privateArray.get(index).mValue = s;
+                index++;
             }
         }
     }
@@ -133,6 +132,7 @@
         ArrayList<String> valueList = new ArrayList<String>();
 
         for(AccountDetail.PreferenceEntry p : privateArray) {
+            Log.i(TAG,""+p.mValue);
             valueList.add(p.mValue);
         }
 
diff --git a/src/com/savoirfairelinux/sflphone/account/AccountDetailBasic.java b/src/com/savoirfairelinux/sflphone/account/AccountDetailBasic.java
index 0db2523..f264e50 100644
--- a/src/com/savoirfairelinux/sflphone/account/AccountDetailBasic.java
+++ b/src/com/savoirfairelinux/sflphone/account/AccountDetailBasic.java
@@ -44,7 +44,6 @@
     public static final String CONFIG_ACCOUNT_ROUTESET = "Account.routeset";
     public static final String CONFIG_ACCOUNT_PASSWORD = "Account.password";
     public static final String CONFIG_ACCOUNT_REALM = "Account.realm";
-    public static final String CONFIG_ACCOUNT_DEFAULT_REALM = "*";
     public static final String CONFIG_ACCOUNT_USERAGENT = "Account.useragent";
 
     private ArrayList<AccountDetail.PreferenceEntry> privateArray;
@@ -61,7 +60,6 @@
         preference.add(new PreferenceEntry(CONFIG_ACCOUNT_ROUTESET, R.string.account_routeset_label));
         preference.add(new PreferenceEntry(CONFIG_ACCOUNT_PASSWORD, R.string.account_password_label));
         preference.add(new PreferenceEntry(CONFIG_ACCOUNT_REALM, R.string.account_realm_label));
-        preference.add(new PreferenceEntry(CONFIG_ACCOUNT_DEFAULT_REALM, R.string.account_useragent_label));
         preference.add(new PreferenceEntry(CONFIG_ACCOUNT_USERAGENT, R.string.account_autoanswer_label));
 
         return preference;
diff --git a/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java b/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
index 6b8c41b..3f4f842 100644
--- a/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
+++ b/src/com/savoirfairelinux/sflphone/account/AccountDetailsHandler.java
@@ -94,11 +94,9 @@
         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_account_interface_label));
+                            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_INTERFACE,
-                            R.string.account_account_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,
diff --git a/src/com/savoirfairelinux/sflphone/account/HistoryHandler.java b/src/com/savoirfairelinux/sflphone/account/HistoryHandler.java
index a52aec6..d10571d 100644
--- a/src/com/savoirfairelinux/sflphone/account/HistoryHandler.java
+++ b/src/com/savoirfairelinux/sflphone/account/HistoryHandler.java
@@ -23,136 +23,6 @@
         }
     }
 
-    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));
-
-        return basicDetailKeys;
-    }
-
-    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_account_interface_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_LOCAL_INTERFACE, R.string.account_local_interface_label));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_INTERFACE, R.string.account_account_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));
-        advancedDetailKeys.add(new PreferenceEntry(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_MSEC,
-                R.string.account_tls_negotiation_timeout_msec));
-
-        return advancedDetailKeys;
-    }
-
-    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));
-        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));
-
-        swigmap.set(ServiceConstants.CONFIG_LOCAL_INTERFACE, nativemap.get(ServiceConstants.CONFIG_LOCAL_INTERFACE));
-        swigmap.set(ServiceConstants.CONFIG_STUN_SERVER, nativemap.get(ServiceConstants.CONFIG_STUN_SERVER));
-        swigmap.set(ServiceConstants.CONFIG_TLS_ENABLE, nativemap.get(ServiceConstants.CONFIG_TLS_ENABLE));
-        swigmap.set(ServiceConstants.CONFIG_SRTP_ENABLE, nativemap.get(ServiceConstants.CONFIG_SRTP_ENABLE));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_TYPE, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_TYPE));
-
-        // swigmap.set(ServiceConstants.CONFIG_ACCOUNT_MAILBOX, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_MAILBOX));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_ENABLE, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_ENABLE));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATUS));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_CODE, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_CODE));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_DESC, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_REGISTRATION_STATE_DESC));
-
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_AUTOANSWER, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_AUTOANSWER));
-        swigmap.set(ServiceConstants.CONFIG_ACCOUNT_DTMF_TYPE, nativemap.get(ServiceConstants.CONFIG_ACCOUNT_DTMF_TYPE));
-        swigmap.set(ServiceConstants.CONFIG_KEEP_ALIVE_ENABLED, nativemap.get(ServiceConstants.CONFIG_KEEP_ALIVE_ENABLED));
-        swigmap.set(ServiceConstants.CONFIG_LOCAL_PORT, nativemap.get(ServiceConstants.CONFIG_LOCAL_PORT));
-        swigmap.set(ServiceConstants.CONFIG_PUBLISHED_ADDRESS, nativemap.get(ServiceConstants.CONFIG_PUBLISHED_ADDRESS));
-
-        swigmap.set(ServiceConstants.CONFIG_PUBLISHED_PORT, nativemap.get(ServiceConstants.CONFIG_PUBLISHED_PORT));
-        swigmap.set(ServiceConstants.CONFIG_PUBLISHED_SAMEAS_LOCAL, nativemap.get(ServiceConstants.CONFIG_PUBLISHED_SAMEAS_LOCAL));
-        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));
-        swigmap.set(ServiceConstants.CONFIG_TLS_CERTIFICATE_FILE, nativemap.get(ServiceConstants.CONFIG_TLS_CERTIFICATE_FILE));
-        swigmap.set(ServiceConstants.CONFIG_TLS_CA_LIST_FILE, nativemap.get(ServiceConstants.CONFIG_TLS_CA_LIST_FILE));
-
-        swigmap.set(ServiceConstants.CONFIG_TLS_CIPHERS, nativemap.get(ServiceConstants.CONFIG_TLS_CIPHERS));
-        swigmap.set(ServiceConstants.CONFIG_TLS_LISTENER_PORT, nativemap.get(ServiceConstants.CONFIG_TLS_LISTENER_PORT));
-        swigmap.set(ServiceConstants.CONFIG_TLS_METHOD, nativemap.get(ServiceConstants.CONFIG_TLS_METHOD));
-        // swigmap.set(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_MSEC, nativemap.get(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_MSEC));
-        // swigmap.set(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC, nativemap.get(ServiceConstants.CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC));
-
-        swigmap.set(ServiceConstants.CONFIG_TLS_PASSWORD, nativemap.get(ServiceConstants.CONFIG_TLS_PASSWORD));
-        swigmap.set(ServiceConstants.CONFIG_TLS_PRIVATE_KEY_FILE, nativemap.get(ServiceConstants.CONFIG_TLS_PRIVATE_KEY_FILE));
-        swigmap.set(ServiceConstants.CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE, nativemap.get(ServiceConstants.CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE));
-        swigmap.set(ServiceConstants.CONFIG_TLS_SERVER_NAME, nativemap.get(ServiceConstants.CONFIG_TLS_SERVER_NAME));
-        swigmap.set(ServiceConstants.CONFIG_TLS_VERIFY_CLIENT, nativemap.get(ServiceConstants.CONFIG_TLS_VERIFY_CLIENT));
-
-        swigmap.set(ServiceConstants.CONFIG_TLS_VERIFY_SERVER, nativemap.get(ServiceConstants.CONFIG_TLS_VERIFY_SERVER));
-        swigmap.set(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS, nativemap.get(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS));
-        swigmap.set(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS_ONCE, nativemap.get(ServiceConstants.CONFIG_ZRTP_DISPLAY_SAS_ONCE));
-        swigmap.set(ServiceConstants.CONFIG_ZRTP_HELLO_HASH, nativemap.get(ServiceConstants.CONFIG_ZRTP_HELLO_HASH));
-        swigmap.set(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING, nativemap.get(ServiceConstants.CONFIG_ZRTP_NOT_SUPP_WARNING));
-
-        return swigmap;
-    }
 
     public static ArrayList<HashMap<String, String>> convertSwigToNative(VectMap swigmap) {
 
diff --git a/src/com/savoirfairelinux/sflphone/adapters/HistoryAdapter.java b/src/com/savoirfairelinux/sflphone/adapters/HistoryAdapter.java
index 8fc7d22..27aee1f 100644
--- a/src/com/savoirfairelinux/sflphone/adapters/HistoryAdapter.java
+++ b/src/com/savoirfairelinux/sflphone/adapters/HistoryAdapter.java
@@ -1,15 +1,15 @@
 package com.savoirfairelinux.sflphone.adapters;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.HashMap;
-
-import com.savoirfairelinux.sflphone.R;
-import com.savoirfairelinux.sflphone.adapters.CallElementAdapter.CallElementView;
-import com.savoirfairelinux.sflphone.model.SipCall;
-import com.savoirfairelinux.sflphone.service.ServiceConstants;
+import java.util.Locale;
+import java.util.TimeZone;
 
 import android.app.Activity;
 import android.content.Context;
+import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -17,11 +17,14 @@
 import android.widget.ImageView;
 import android.widget.TextView;
 
-public class HistoryAdapter extends BaseAdapter{
+import com.savoirfairelinux.sflphone.R;
+import com.savoirfairelinux.sflphone.service.ServiceConstants;
+
+public class HistoryAdapter extends BaseAdapter {
 
     Context mContext;
     ArrayList<HashMap<String, String>> dataset;
-
+    private static final String TAG = HistoryAdapter.class.getSimpleName();
 
     public HistoryAdapter(Activity activity, ArrayList<HashMap<String, String>> entries) {
         mContext = activity;
@@ -36,12 +39,14 @@
         if (rowView == null) {
             // Get a new instance of the row layout view
             LayoutInflater inflater = LayoutInflater.from(mContext);
-            rowView = inflater.inflate(R.layout.item_contact, null);
+            rowView = inflater.inflate(R.layout.item_history, null);
 
             // Hold the view objects in an object
             // so they don't need to be re-fetched
             entryView = new HistoryView();
             entryView.displayName = (TextView) rowView.findViewById(R.id.display_name);
+            entryView.duration = (TextView) rowView.findViewById(R.id.duration);
+            entryView.date = (TextView) rowView.findViewById(R.id.date_start);
 
             rowView.setTag(entryView);
         } else {
@@ -53,26 +58,44 @@
         
 //        SipCall call = (SipCall) mCallList.values().toArray()[position];
         entryView.displayName.setText(dataset.get(pos).get(ServiceConstants.HISTORY_ACCOUNT_ID_KEY));
-//        entryView.phones.setText(call.getPhone());
-//        entryView.state.setText(CURRENT_STATE_LABEL + call.getCallStateString());
+
+        
+        long timestampEnd = Long.parseLong(dataset.get(pos).get(ServiceConstants.HISTORY_TIMESTAMP_STOP_KEY));
+        long timestampStart = Long.parseLong(dataset.get(pos).get(ServiceConstants.HISTORY_TIMESTAMP_START_KEY));
+        entryView.date.setText(getDate(timestampStart,"yyyy-MM-dd"));
+        
+        long duration = timestampEnd - timestampStart;
+        entryView.duration.setText("Duration: "+duration);
 
         return rowView;
 
     }
-    
+
+    private String getDate(long timeStamp, String format) {
+        Calendar cal = Calendar.getInstance();
+        TimeZone tz = cal.getTimeZone();
+        SimpleDateFormat objFormatter = new SimpleDateFormat(format, Locale.CANADA);
+        objFormatter.setTimeZone(tz);
+
+        Calendar objCalendar = Calendar.getInstance(tz);
+        objCalendar.setTimeInMillis(timeStamp*1000);
+        String result = objFormatter.format(objCalendar.getTime());
+        objCalendar.clear();
+        return result;
+    }
+
     /*********************
      * ViewHolder Pattern
      *********************/
     public class HistoryView {
-        protected ImageView photo;
         protected TextView displayName;
-        protected TextView phones;
-        public TextView state;
+        protected TextView date;
+        public TextView duration;
     }
-    
+
     @Override
     public int getCount() {
-       
+
         return dataset.size();
     }
 
@@ -87,13 +110,13 @@
     }
 
     public void clear() {
-       dataset.clear();
-        
+        dataset.clear();
+
     }
 
     public void addAll(ArrayList<HashMap<String, String>> history) {
         dataset.addAll(history);
-        
+
     }
 
 }
diff --git a/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java b/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
index e682b2b..68179b0 100644
--- a/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/AccountPreferenceActivity.java
@@ -31,7 +31,10 @@
 
 package com.savoirfairelinux.sflphone.client;
 
+import java.net.NetworkInterface;
+import java.net.SocketException;
 import java.util.ArrayList;
+import java.util.Enumeration;
 import java.util.HashMap;
 
 import android.app.Activity;
@@ -42,6 +45,7 @@
 import android.os.Bundle;
 import android.preference.CheckBoxPreference;
 import android.preference.EditTextPreference;
+import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceChangeListener;
 import android.preference.PreferenceActivity;
@@ -97,7 +101,7 @@
             initCreation();
             break;
         case mode.EDITION_MODE:
-            Log.i(TAG, "ESDITION");
+            Log.i(TAG, "EDITION");
             initEdition();
             break;
         }
@@ -131,7 +135,7 @@
         ArrayList<String> advancedPreferenceList = b.getStringArrayList(AccountDetailAdvanced.BUNDLE_TAG);
         ArrayList<String> srtpPreferenceList = b.getStringArrayList(AccountDetailSrtp.BUNDLE_TAG);
         ArrayList<String> tlsPreferenceList = b.getStringArrayList(AccountDetailTls.BUNDLE_TAG);
-
+        
         basicDetails = new AccountDetailBasic(basicPreferenceList);
         advancedDetails = new AccountDetailAdvanced(advancedPreferenceList);
         srtpDetails = new AccountDetailSrtp(srtpPreferenceList);
@@ -301,23 +305,49 @@
     
     private void setPreferenceDetails(AccountDetail details) {
         for (AccountDetail.PreferenceEntry p : details.getDetailValues()) {
+            Log.i(TAG,"setPreferenceDetails: pref "+p.mKey+ " value "+ p.mValue);
             Preference pref = mPreferenceManager.findPreference(p.mKey);
             if (pref != null) {
+                if(p.mKey == AccountDetailAdvanced.CONFIG_LOCAL_INTERFACE){
+                    ArrayList<CharSequence> entries = new ArrayList<CharSequence>();
+                    try {
+                        
+                        for (Enumeration<NetworkInterface> list = NetworkInterface.getNetworkInterfaces(); list.hasMoreElements();) {
+                            NetworkInterface i = list.nextElement();
+                            Log.e("network_interfaces", "display name " + i.getDisplayName());
+                            if(i.isUp())
+                                entries.add(i.getDisplayName());
+                        }
+                    } catch (SocketException e) {
+                        Log.e(TAG, e.toString());
+                    }
+                    CharSequence[] display = new CharSequence[entries.size()];
+                    entries.toArray(display);
+                    ((ListPreference) pref).setEntries(display);
+                    ((ListPreference) pref).setEntryValues(display);
+                    pref.setSummary(p.mValue);
+                    continue;
+                }
                 if (!p.isTwoState) {
                     ((EditTextPreference) pref).setText(p.mValue);
                     pref.setSummary(p.mValue);
                 }
+            } else {
+                Log.w(TAG,"pref not found");
             }
         }
     }
 
     private void addPreferenceListener(AccountDetail details, OnPreferenceChangeListener listener) {
         for (AccountDetail.PreferenceEntry p : details.getDetailValues()) {
+            Log.i(TAG,"addPreferenceListener: pref "+p.mKey);
             Preference pref = mPreferenceManager.findPreference(p.mKey);
             if (pref != null) {
                 if (!p.isTwoState) {
                     pref.setOnPreferenceChangeListener(listener);
                 }
+            } else {
+                Log.w(TAG,"addPreferenceListener: pref not found");
             }
         }
     }
@@ -373,7 +403,7 @@
     private AlertDialog createDeleteDialog() {
         Activity ownerActivity = this;
         AlertDialog.Builder builder = new AlertDialog.Builder(ownerActivity);
-        builder.setMessage("Do you realy want to delete this account").setTitle("Delete Account")
+        builder.setMessage("Do you really want to delete this account").setTitle("Delete Account")
                 .setPositiveButton("Ok", new DialogInterface.OnClickListener() {
                     public void onClick(DialogInterface dialog, int whichButton) {
                         Bundle bundle = new Bundle();
diff --git a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
index 4afc441..6d14815 100644
--- a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
@@ -30,6 +30,10 @@
  */
 package com.savoirfairelinux.sflphone.client;
 
+import java.net.NetworkInterface;
+import java.net.SocketException;
+import java.util.Enumeration;
+
 import android.app.ActionBar;
 import android.app.Activity;
 import android.app.Fragment;
@@ -93,7 +97,7 @@
                 /* putFragment (Bundle bundle, String key, Fragment fragment) */
                 getFragmentManager().putFragment(bundle, mSectionsPagerAdapter.getClassName(i), mSectionsPagerAdapter.getFragment(i));
             } catch (IllegalStateException e) {
-                Log.e(TAG, e.toString()+"fragment=" + mSectionsPagerAdapter.getFragment(i));
+                Log.e(TAG, e.toString() + "fragment=" + mSectionsPagerAdapter.getFragment(i));
             }
         }
         Log.w(TAG, "onSaveInstanceState()");
@@ -261,7 +265,7 @@
 
                 SipCall c = new SipCall(infos);
                 mCallElementList.addCall(c);
-                
+
                 launchCallActivity(infos);
             }
 
@@ -280,7 +284,6 @@
         public void onServiceConnected(ComponentName className, IBinder binder) {
             service = ISipService.Stub.asInterface(binder);
 
-            
             mBound = true;
             mCallElementList.onServiceSipBinded(service);
             mHistorySectionFragment.onServiceSipBinded(service);
diff --git a/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java b/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
index e4d72c9..5435c8b 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/AccountManagementFragment.java
@@ -113,7 +113,8 @@
 
         setPreferenceScreen(getAccountListPreferenceScreen());
 
-        LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mMessageReceiver, new IntentFilter(ConfigurationManagerCallback.ACCOUNTS_CHANGED));
+        LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mMessageReceiver,
+                new IntentFilter(ConfigurationManagerCallback.ACCOUNTS_CHANGED));
     }
 
     @Override
@@ -149,12 +150,12 @@
 
                 HashMap<String, String> accountDetails = new HashMap<String, String>();
                 accountDetails = (HashMap<String, String>) bundle.getSerializable(AccountDetail.TAG);
-                
+
                 Preference accountScreen = accountPreferenceHashMap.get(accountID);
                 mRoot.removePreference(accountScreen);
                 accountPreferenceHashMap.remove(accountID);
                 setAccountDetails(accountID, accountDetails);
-                
+
             } else if (resultCode == AccountPreferenceActivity.result.ACCOUNT_DELETED) {
                 Bundle bundle = data.getExtras();
                 String accountID = bundle.getString("AccountID");
@@ -181,7 +182,7 @@
             Log.e(TAG, "Cannot call service method", e);
         }
     }
-    
+
     private void setAccountDetails(String accountID, HashMap<String, String> accountDetails) {
         try {
             service.setAccountDetails(accountID, accountDetails);
@@ -189,7 +190,7 @@
             Log.e(TAG, "Cannot call service method", e);
         }
     }
-    
+
     private void deleteSelectedAccount(String accountID) {
         Log.i(TAG, "DeleteSelectedAccount");
         try {
@@ -272,8 +273,6 @@
         startActivityForResult(intent, ACCOUNT_EDIT_REQUEST);
     }
 
-    
-
     private ArrayList<String> getAccountList() {
         ArrayList<String> accountList = null;
         try {
@@ -292,6 +291,9 @@
         HashMap<String, String> accountDetails = null;
         try {
             accountDetails = (HashMap<String, String>) service.getAccountDetails(accountID);
+
+            if (accountDetails.containsKey("TLS.negotiationTimeoutSec"))
+                Log.i(TAG, "localinterface existe");
         } catch (RemoteException e) {
             Log.e(TAG, "Cannot call service method", e);
         }
@@ -299,8 +301,6 @@
         return accountDetails;
     }
 
-    
-
     public PreferenceScreen getAccountListPreferenceScreen() {
         Activity currentContext = getActivity();