Always select autologin account in dialog

 Bug: 3385629
 Fixes the issue where if the user hasn't explictly selected an autologin
 account the selection dialog would show no selection.

Change-Id: Ib2847aed7f528e9e9679a5fa3aa3b0b8da85d1d1
diff --git a/src/com/android/browser/preferences/PrivacySecurityPreferencesFragment.java b/src/com/android/browser/preferences/PrivacySecurityPreferencesFragment.java
index c0cf3cf..91705e5 100644
--- a/src/com/android/browser/preferences/PrivacySecurityPreferencesFragment.java
+++ b/src/com/android/browser/preferences/PrivacySecurityPreferencesFragment.java
@@ -44,6 +44,11 @@
 
         Preference e = findPreference(BrowserSettings.PREF_CLEAR_HISTORY);
         e.setOnPreferenceChangeListener(this);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
         setupAutoLoginPreference();
     }
 
@@ -66,6 +71,8 @@
         values[i] = "";
         autologinPref.setEntries(names);
         autologinPref.setEntryValues(values);
+        autologinPref.setValue(BrowserSettings.getInstance()
+                .getAutoLoginAccount(getActivity()));
     }
 
     private void updateAutoLoginSummary(Preference pref) {