Open Bug 1927141 Opened 10 months ago Updated 6 months ago

Make it easier to use Gecko preferences from Fenix (and others)

Categories

(Firefox for Android :: Browser Engine, enhancement)

All
Android
enhancement

Tracking

()

People

(Reporter: gerard-majax, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][geckoview])

As part of https://phabricator.services.mozilla.com/D225780?id=935483 we're adding a new mechanism to pull crash reports. We want that to work the same way on desktop and mobile, and are plugging into the new existing UnubsmittedCrashDialog code to expose the information to the user. One thing is that we may want to offer the ability for the user to never be bothered again about that.

This is controlled via a pref that is checked by the RemoteSettingsCrashPull code, browser.crashReports.requestedNeverShowAgain. In the linked example I could somehow get the Never show again button to work with this preference, however I am not completely satisfied with the current status:

  • it seems to be there are multiples places to update, which are all to be done manually, making it a bit difficult and could be error prone
  • it seems we re-define a default value, that needs to be synced with the modules/libpref/init/StaticPrefList.yaml content that already defines it
  • it seems that the value once set from fenix is only reflected to lower layers (i.e. my RemoteSettingsCrashPull) on the next startup of Fenix, which is not good (user did tap "never bother me again" we should respect that right now) (of course one could check the value at another place but then it means we have duplication when we could avoid some)
  • it seems the default value on gecko side gets changes when the fenix value is changed, making the reset button of about:config setting the incorrect value (i would expect the value defined in modules/libpref/init/StaticPrefList.yaml)

Obviously there may be errors on my side in that code, and I'd be happy to be pointed to accurate documentation on how to achieve it correctly ; to the best of my knowledge, I could not find those.

The severity field is not set for this bug.
:towhite, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(towhite)
Component: Experimentation and Telemetry → Browser Engine
Flags: needinfo?(towhite)

I'm getting myself stuck in a state where my setting keeps reverting the pref visible in about:config to true. Is PrefWithoutDefault correct use? https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeSettings.java#144

The severity field is not set for this bug.
:boek, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jboek)

When GeckoView is booted up it will overwrite any pref that is set in Gecko with whatever value is set through the RuntimeSettingsBuilder in the client application.

Severity: -- → N/A
Type: defect → enhancement
Flags: needinfo?(jboek)
Whiteboard: [fxdroid][geckoview]
You need to log in before you can comment on or make changes to this bug.