From c885a24c145c085a2507f3ce39ce80ab1773956e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Isaksson?= Date: Tue, 5 Jun 2012 17:19:04 +0200 Subject: Reset to default did not reset cached settings Some settings such as the current search engine to use was cached in the BrowserSetting object and not always read from shared preferences. When settings were reset to default these cached values were not reset causing the old (possibly non-default) value to still be used. Change-Id: I805a339a6238c96dc73cbda47981053bd4f6eace --- src/com/android/browser/BrowserSettings.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 8dfd4d7..7d3195a 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -506,9 +506,14 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, .clear() .putLong(GoogleAccountLogin.PREF_AUTOLOGIN_TIME, gal) .apply(); + resetCachedValues(); syncManagedSettings(); } + private void resetCachedValues() { + updateSearchEngine(false); + } + public AutoFillProfile getAutoFillProfile() { return mAutofillHandler.getAutoFillProfile(); } -- cgit v1.1