diff --git a/src/eu/alefzero/owncloud/ui/activity/Preferences.java b/src/eu/alefzero/owncloud/ui/activity/Preferences.java index 1e35896cee..3677f8aef4 100644 --- a/src/eu/alefzero/owncloud/ui/activity/Preferences.java +++ b/src/eu/alefzero/owncloud/ui/activity/Preferences.java @@ -24,6 +24,7 @@ import java.util.Vector; import eu.alefzero.owncloud.OwnCloudSession; import eu.alefzero.owncloud.R; import eu.alefzero.owncloud.authenticator.AccountAuthenticator; +import eu.alefzero.owncloud.authenticator.AuthUtils; import eu.alefzero.owncloud.db.DbHandler; import android.accounts.Account; @@ -98,6 +99,12 @@ public class Preferences extends PreferenceActivity { mAccounts = accMan.getAccountsByType(AccountAuthenticator.ACCOUNT_TYPE); ListPreference accountList = (ListPreference) findPreference("select_oc_account"); + // Display the name of the current account if there is any + Account defaultAccount = AuthUtils.getCurrentOwnCloudAccount(this); + if(defaultAccount != null){ + accountList.setSummary(defaultAccount.name); + } + // Transform accounts into array of string for preferences to use String[] accNames = new String[mAccounts.length]; for(int i = 0; i < mAccounts.length; i++){