Bug 991555 - Write native prefs to the custom GeckoSharedPrefs file. r=rnewman

This commit is contained in:
Brian Nicholson 2014-04-03 23:50:52 -07:00
parent cd3e751c10
commit 9d6b585c4a
2 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ package org.mozilla.gecko.preferences;
import java.lang.reflect.Field;
import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.PrefsHelper;
import org.mozilla.gecko.R;
@ -33,6 +34,9 @@ public class GeckoPreferenceFragment extends PreferenceFragment {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Write prefs to our custom GeckoSharedPrefs file.
getPreferenceManager().setSharedPreferencesName(GeckoSharedPrefs.APP_PREFS_NAME);
int res = getResource();
// Display a menu for Search preferences.

View File

@ -122,6 +122,9 @@ public class GeckoPreferences
// Fragments because of an Android bug in ActionBar (described in bug 866352 and
// fixed in bug 833625).
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
// Write prefs to our custom GeckoSharedPrefs file.
getPreferenceManager().setSharedPreferencesName(GeckoSharedPrefs.APP_PREFS_NAME);
int res = 0;
if (intentExtras != null && intentExtras.containsKey(INTENT_EXTRA_RESOURCES)) {
// Fetch resource id from intent.