diff options
author | Björn Isaksson <bjorn.isaksson@sonymobile.com> | 2012-06-05 17:19:04 +0200 |
---|---|---|
committer | Kenneth Andersson <kenneth.andersson@sonymobile.com> | 2012-09-05 11:35:22 +0200 |
commit | c885a24c145c085a2507f3ce39ce80ab1773956e (patch) | |
tree | 6de7b93e88206fd20a93833bd7e6a4f152dea07b | |
parent | 922afab3f6044ff38c78d1d991c74ca003f90302 (diff) | |
download | packages_apps_Browser-c885a24c145c085a2507f3ce39ce80ab1773956e.zip packages_apps_Browser-c885a24c145c085a2507f3ce39ce80ab1773956e.tar.gz packages_apps_Browser-c885a24c145c085a2507f3ce39ce80ab1773956e.tar.bz2 |
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
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 5 |
1 files changed, 5 insertions, 0 deletions
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(); } |