Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to modify the 'permissions.default.image' preference based on website host in Firefox for Android?

  • 4 replies
  • 0 have this problem
  • 33 views
  • Last reply by Paul

more options

I am currently trying to customize the Firefox browser for Android and have encountered a hurdle. Specifically, I want to change the 'permissions.default.image' setting according to the host of the website being visited.

I have searched through the source code, but I'm unable to locate where this preference is being modified, which is adding to my difficulties. I'm uncertain about the next steps to take.

Could anyone please guide me on how to implement this functionality, or direct me towards relevant resources or documentation that could help me? Any leads or suggestions would be greatly appreciated.

Thank you in advance for your assistance.

Best regards

I've already attempted to implement this in the GeckoEngineSession in the override fun onLoadRequest method, as that's where the host is loaded. Unfortunately, I haven't had any success with this approach.

I am currently trying to customize the Firefox browser for Android and have encountered a hurdle. Specifically, I want to change the 'permissions.default.image' setting according to the host of the website being visited. I have searched through the source code, but I'm unable to locate where this preference is being modified, which is adding to my difficulties. I'm uncertain about the next steps to take. Could anyone please guide me on how to implement this functionality, or direct me towards relevant resources or documentation that could help me? Any leads or suggestions would be greatly appreciated. Thank you in advance for your assistance. Best regards I've already attempted to implement this in the GeckoEngineSession in the override fun onLoadRequest method, as that's where the host is loaded. Unfortunately, I haven't had any success with this approach.

All Replies (4)

more options

it's really very strange, it's like this permission did not exist in the source code. I can't find anything about:config values anywhere. https://github.com/search?q=repo%3Amozilla-mobile%2Ffirefox-android%20permissions.default.image&type=code

more options

Hi

Some of the preferences are set in the GeckoView engine. The docs at https://mozilla.github.io/geckoview/ may be of use in looking into this further.

more options

Hello, thank you for your answer, indeed the permission appears in the geckoview engine https://searchfox.org/mozilla-central/search?q=permissions.default.image&path=&case=false&regexp=false but I still can't change the value of permissions.default.image from geckoEngineSession.kt . Do you know if it's possible?

more options

Hi

This is something that you would be better raising with our developers. I recommend that you join our Matrix instance at https://chat.mozilla.org and head to the "Fenix" room.