Closed Bug 1022103 Opened 10 years ago Closed 3 years ago

Move pref handling code into classes

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: wesj, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

GeckoPreferences.java contains a lot of if-else sets that handle setup and changing different prefs. It means that handling for individual prefs is spread out through the file. It would be nice to push it together so the handling for an individual pref is consolidated in one place.

I started something like this in bug 1001309. Wanted to try and finish it up here.
Attached patch WIP Patch (obsolete) — Splinter Review
Here's my WIP for this. Curious what you think liuche? I'm still a little confused about some prefs that use a SharedPreferenceListener and others that use a PreferenceListener for updates, but this tries to handle both.
Attachment #8436271 - Flags: feedback?(liuche)
Attached patch PatchSplinter Review
Still debating this a bit, but this works fairly well. If we pull all these into their own files (and with bug 967376) we'd have stripped a lot of cruft out of this file.

There's also this strangeness with preference listeners and sharedPreference listeners in here that I don't understand very well.
Attachment #8436271 - Attachment is obsolete: true
Attachment #8436271 - Flags: feedback?(liuche)
Attachment #8437495 - Flags: feedback?(liuche)
Attachment #8437495 - Flags: feedback?(liuche)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: