Closed Bug 991555 Opened 7 years ago Closed 7 years ago
Native prefs in the prefs screen are not written to shared prefs file
Tested with: Build: Firefox for Android 31.0a1 (2013-04-02) Device: LG Nexus 4 OS: Android 4.4.2 From Settings -> Customize -> Tab choose "Always restore" Steps to Reproduce: 1. Open some web pages in different tabs 2. Exit Firefox from app menu or from Task Manager 3. Start firefox Expected result: - Tabs loaded at Step 1 are restored Actual Result: - Tabs loaded at Step 1 are not restored.
The bug is also reproducible on HTC One X (Android 4.1.1)
Assignee: nobody → bnicholson
tracking-fennec: ? → 31+
After choosing Always Restore, I found the pref gets saved to org.mozilla.fennec_brian_preferences.xml instead of GeckoApp.xml. Our prefs screen needs to be changed to use our custom shared prefs file.
Summary: Tabs are not restored with "Always restore" option enabled → Native prefs in the prefs screen are not written to shared prefs file
At first, I tried calling `PreferenceManager.setDefaultValues(this, GeckoSharedPrefs.APP_PREFS_NAME, Context.MODE_PRIVATE, R.xml.preferences, false);` from GeckoPreferences, but this had no effect. Accessing the PreferenceManager directly and setting the name seems to do the trick.
Attachment #8401586 - Flags: review?(rnewman)
BTW, if we're using preference headers, getPreferenceManager() returns null when called from the PreferenceActivity (https://groups.google.com/forum/#!topic/android-developers/O88vw6rCRes). This is why I had to do the call in two different places.
Attachment #8401586 - Flags: review?(rnewman) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 31
Verified fixed on: Build: Firefox for Android 31.0a1 (2013-04-06) Device: LG Nexus 4 OS: Android 4.4.2
You need to log in before you can comment on or make changes to this bug.