* #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/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();