118
edits
Changes
no edit summary
└── default // Default folder
└── preferences.json // Preferences for all users with different SIM cards.
== Partner Content Providers ==
Android system images can ship with two content providers to customize installed browsers:
* content://com.android.partnerbookmarks - For partner bookmarks
* content://com.android.partnerbrowsercustomizations - For customizations (Details see below)
Firefox for Android supports reading data from both of those content providers (Starting with Firefox for Android 50.0) if this has been enabled by a distribution. If the following preferences are not written by a distribution then Firefox for Android will ignore the data from the partner content providers.
''/distribution/preferences.json:''
<pre>
[..]
"AndroidPreferences": {
"distribution.read_partner_bookmarks_provider": true,
"distribution.read_partner_customizations_provider": true
}
[..]
</pre>
=== Bookmarks Content Provider ===
Firefox for Android (>= 50.0) supports reading bookmarks and folders from the content provider. Reading icons from the content provider is currently not supported (See {{bug|1286203}}). Editing and deleting bookmarks/folders is not supported yet but planned.
An example implementation of the content provider can be found in the official Android source tree:
* https://android.googlesource.com/platform/packages/providers/PartnerBookmarksProvider/+/master/src/com/android/providers/partnerbookmarks/PartnerBookmarksProvider.java
=== Customizations Content Provider ===
Firefox for Android (>= 50.0) only supports reading the 'homepage' from the content provider. All other values are ignored.
content://com.android.partnerbrowsercustomizations
{| class="wikitable"
|-
! Path !! Column !! Supported
|-
| /homepage || homepage || Yes
|-
| /disableincognitomode || disableincognitomode || No
|-
| /disablebookmarksediting || disablebookmarksediting || No
|}
=== Testing ===
There's a test app with sample data available on GitHub:
* https://github.com/pocmo/BrowserPartner
The test app uses slightly different content provider authorities to allow being installed on devices that already ship with partner content providers:
* com.android.partnerbookmarks.'''''test'''''
* com.android.partnerbrowsercustomizations.'''''test'''''
A custom Firefox build is required to read from the test content providers.