diff options
author | John Reck <jreck@google.com> | 2011-02-25 13:29:56 -0800 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-02-25 13:29:56 -0800 |
commit | a9496e1ab66fda87ea406f31d5ec4a213e0b6307 (patch) | |
tree | 77470fe2da0ad9c781ec4f83322c579cfd5c7d3a | |
parent | edcc65514a0cfd99eeda82fd77d4e298bacbe737 (diff) | |
download | packages_apps_Browser-a9496e1ab66fda87ea406f31d5ec4a213e0b6307.zip packages_apps_Browser-a9496e1ab66fda87ea406f31d5ec4a213e0b6307.tar.gz packages_apps_Browser-a9496e1ab66fda87ea406f31d5ec4a213e0b6307.tar.bz2 |
Restart browser after "reset to default"
Bug: 3483736
Change-Id: I9e83cb0ba9307163d75b8e48505f50e575800cc4
-rw-r--r-- | src/com/android/browser/preferences/AdvancedPreferencesFragment.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/preferences/AdvancedPreferencesFragment.java b/src/com/android/browser/preferences/AdvancedPreferencesFragment.java index 835778a..e2e45f5 100644 --- a/src/com/android/browser/preferences/AdvancedPreferencesFragment.java +++ b/src/com/android/browser/preferences/AdvancedPreferencesFragment.java @@ -16,9 +16,11 @@ package com.android.browser.preferences; +import com.android.browser.BrowserActivity; import com.android.browser.BrowserSettings; import com.android.browser.R; +import android.content.Intent; import android.content.res.Resources; import android.os.Bundle; import android.preference.ListPreference; @@ -62,6 +64,9 @@ public class AdvancedPreferencesFragment extends PreferenceFragment e = findPreference(BrowserSettings.PREF_DEFAULT_TEXT_ENCODING); e.setOnPreferenceChangeListener(this); + e = findPreference(BrowserSettings.PREF_EXTRAS_RESET_DEFAULTS); + e.setOnPreferenceChangeListener(this); + e = findPreference(BrowserSettings.PREF_PLUGIN_STATE); e.setOnPreferenceChangeListener(this); updatePluginSummary((ListPreference) e); @@ -121,7 +126,8 @@ public class AdvancedPreferencesFragment extends PreferenceFragment } else if (pref.getKey().equals(BrowserSettings.PREF_EXTRAS_RESET_DEFAULTS)) { Boolean value = (Boolean) objValue; if (value.booleanValue() == true) { - getActivity().finish(); + startActivity(new Intent(BrowserActivity.ACTION_RESTART, null, + getActivity(), BrowserActivity.class)); return true; } } else if (pref.getKey().equals(BrowserSettings.PREF_PLUGIN_STATE)) { |